• I’m trying to design a page template for a custom post type registered as cfd_venue. When I try to access the page via permalink, it does not get picked up by my template file single-cfd_venue.php

    Here’s how I register my custom post type:

    register_post_type( 'cfd_venue',
        array(
          'labels' => array(
            'name' => __( 'Venues' ),
            'singular_name' => __( 'Venue' ),
            'add_new' => __( 'Add New' ),
            'add_new_item' => __( 'Add New Venue' ),
            'edit' => __( 'Edit' ),
            'edit_new_item' => __( 'Edit New Venue' ),
            'new_item' => __( 'New Venue' ),
            'view' => __( 'View' ),
            'view_item' => __( 'View Venue' ),
            'search_items' => __( 'Search Venues' ),
            'not_found' => __( 'No venues found' ),
            'not_found_in_trash' => __( 'No venues found in Trash' )
          ),
          'public' => true,
          'show_ui' => true,
          'menu_position' => 21,
          'supports' => array('title', 'thumbnail', 'editor')
        )
      );

    What am I doing wrong?

The topic ‘single.php for Custom Post Type’ is closed to new replies.