I have a custom post type called 'business_sold' that is not reading archive-business_sold.php but instead is reading index.php. The custom post type is however, properly reading single-business_sold.php.
This is how I registered the custom post type (initially via a plugin through which single-business_sold.php worked) and then I manually added the following code to functions.php:
register_post_type('Business_Sold', array( 'label' => 'Businesses Sold','description' => '','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post','hierarchical' => false,'rewrite' => array('slug' => ''),'query_var' => true,'has_archive' => true,'menu_position' => 5,'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),'taxonomies' => array('category','post_tag',),'labels' => array (
'name' => 'Businesses Sold',
'singular_name' => 'Business Sold',
'menu_name' => 'Businesses Sold',
'add_new' => 'Add Business Sold',
'add_new_item' => 'Add New Business Sold',
'edit' => 'Edit',
'edit_item' => 'Edit Business Sold',
'new_item' => 'New Business Sold',
'view' => 'View Business Sold',
'view_item' => 'View Business Sold',
'search_items' => 'Search Businesses Sold',
'not_found' => 'No Businesses Sold Found',
'not_found_in_trash' => 'No Businesses Sold Found in Trash',
'parent' => 'Parent Business Sold',
),) );
Any ideas on why this is happening?
Business_Soldas the CPT slug, rather thanbusiness_sold. So if that slug is case-sensitive, the template hierarchy might be looking forsingle-Business_Sold.php, rather thansingle-business_sold.php. – Chip Bennett Sep 9 '11 at 18:58