title: With two custom post types, single posts in second post type won't display
body: <p>I created two custom post types in <code>functions.php</code>. One is called "Store" and I have <code>single-store.php</code> for this post type and another is called "Centre" and I have <code>single-centre.php</code> for this post type also. The <code>single-store.php</code> display fine, as well the <code>single.php</code> too, but the <code>single-centre.php</code> won't display at all. All it shows is 404 error page. What was wrong?</p>
  
  <p>Those are the code in functions.php for registering custom post types.</p>
  
  <pre><code>// Register Custom Post Type
  function stores_post_type() {
  
      $labels = array(
          'name'                  =&gt; _x( 'Stores', 'Post Type General Name', 'text_domain' ),
          'singular_name'         =&gt; _x( 'Store', 'Post Type Singular Name', 'text_domain' ),
          'menu_name'             =&gt; __( 'Store', 'text_domain' ),
          'name_admin_bar'        =&gt; __( 'Post Type', 'text_domain' ),
          'archives'              =&gt; __( 'Item Archives', 'text_domain' ),
          'parent_item_colon'     =&gt; __( 'Parent Store:', 'text_domain' ),
          'all_items'             =&gt; __( 'All Stores', 'text_domain' ),
          'add_new_item'          =&gt; __( 'Add New Store', 'text_domain' ),
          'add_new'               =&gt; __( 'Add New Store', 'text_domain' ),
          'new_item'              =&gt; __( 'New Item', 'text_domain' ),
          'edit_item'             =&gt; __( 'Edit Store', 'text_domain' ),
          'update_item'           =&gt; __( 'Update Store', 'text_domain' ),
          'view_item'             =&gt; __( 'View Store', 'text_domain' ),
          'search_items'          =&gt; __( 'Search stores', 'text_domain' ),
          'not_found'             =&gt; __( 'No stores found', 'text_domain' ),
          'not_found_in_trash'    =&gt; __( 'Not stores found in Trash', 'text_domain' ),
          'featured_image'        =&gt; __( 'Featured Image', 'text_domain' ),
          'set_featured_image'    =&gt; __( 'Set featured image', 'text_domain' ),
          'remove_featured_image' =&gt; __( 'Remove featured image', 'text_domain' ),
          'use_featured_image'    =&gt; __( 'Use as featured image', 'text_domain' ),
          'insert_into_item'      =&gt; __( 'Insert into item', 'text_domain' ),
          'uploaded_to_this_item' =&gt; __( 'Uploaded to this item', 'text_domain' ),
          'items_list'            =&gt; __( 'Items list', 'text_domain' ),
          'items_list_navigation' =&gt; __( 'Items list navigation', 'text_domain' ),
          'filter_items_list'     =&gt; __( 'Filter items list', 'text_domain' ),
      );
      $args = array(
          'label'                 =&gt; __( 'Store', 'text_domain' ),
          'description'           =&gt; __( 'store information pages', 'text_domain' ),
          'labels'                =&gt; $labels,
          'supports'              =&gt; array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'custom-fields', ),
          'taxonomies'            =&gt; array( 'category', 'post_tag' ),
          'hierarchical'          =&gt; false,
          'public'                =&gt; true,
          'show_ui'               =&gt; true,
          'show_in_menu'          =&gt; true,
          'menu_position'         =&gt; 5,
          'show_in_admin_bar'     =&gt; true,
          'show_in_nav_menus'     =&gt; true,
          'can_export'            =&gt; true,
          'has_archive'           =&gt; true,        
          'exclude_from_search'   =&gt; false,
          'publicly_queryable'    =&gt; true,
          'capability_type'       =&gt; 'page',
      );
      register_post_type( 'store', $args );
  
  }
  add_action( 'init', 'stores_post_type', 0 );
  
  // Register Custom Post Type
  function centres_post_type() {
  
      $labels = array(
          'name'                  =&gt; _x( 'Centres', 'Post Type General Name', 'text_domain' ),
          'singular_name'         =&gt; _x( 'Centre', 'Post Type Singular Name', 'text_domain' ),
          'menu_name'             =&gt; __( 'Centre', 'text_domain' ),
          'name_admin_bar'        =&gt; __( 'Post Type', 'text_domain' ),
          'archives'              =&gt; __( 'Item Archives', 'text_domain' ),
          'parent_item_colon'     =&gt; __( 'Parent Centre:', 'text_domain' ),
          'all_items'             =&gt; __( 'All Centres', 'text_domain' ),
          'add_new_item'          =&gt; __( 'Add New Centre', 'text_domain' ),
          'add_new'               =&gt; __( 'Add New Centre', 'text_domain' ),
          'new_item'              =&gt; __( 'New Centre', 'text_domain' ),
          'edit_item'             =&gt; __( 'Edit Centre', 'text_domain' ),
          'update_item'           =&gt; __( 'Update Centre', 'text_domain' ),
          'view_item'             =&gt; __( 'View Centre', 'text_domain' ),
          'search_items'          =&gt; __( 'Search centres', 'text_domain' ),
          'not_found'             =&gt; __( 'Not found', 'text_domain' ),
          'not_found_in_trash'    =&gt; __( 'Not found in Trash', 'text_domain' ),
          'featured_image'        =&gt; __( 'Featured Image', 'text_domain' ),
          'set_featured_image'    =&gt; __( 'Set featured image', 'text_domain' ),
          'remove_featured_image' =&gt; __( 'Remove featured image', 'text_domain' ),
          'use_featured_image'    =&gt; __( 'Use as featured image', 'text_domain' ),
          'insert_into_item'      =&gt; __( 'Insert into item', 'text_domain' ),
          'uploaded_to_this_item' =&gt; __( 'Uploaded to this item', 'text_domain' ),
          'items_list'            =&gt; __( 'Items list', 'text_domain' ),
          'items_list_navigation' =&gt; __( 'Items list navigation', 'text_domain' ),
          'filter_items_list'     =&gt; __( 'Filter items list', 'text_domain' ),
      );
      $args = array(
          'label'                 =&gt; __( 'Centre', 'text_domain' ),
          'description'           =&gt; __( 'centre information', 'text_domain' ),
          'labels'                =&gt; $labels,
          'supports'              =&gt; array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'custom-fields', ),
          'taxonomies'            =&gt; array( 'category', 'post_tag' ),
          'hierarchical'          =&gt; false,
          'public'                =&gt; true,
          'show_ui'               =&gt; true,
          'show_in_menu'          =&gt; true,
          'menu_position'         =&gt; 6,
          'show_in_admin_bar'     =&gt; true,
          'show_in_nav_menus'     =&gt; true,
          'can_export'            =&gt; true,
          'has_archive'           =&gt; true,        
          'exclude_from_search'   =&gt; false,
          'publicly_queryable'    =&gt; true,
          'capability_type'       =&gt; 'page',
      );
      register_post_type( 'centre', $args );
  
  }
  add_action( 'init', 'centres_post_type', 0 );
  </code></pre>