I've created a custom post type:
register_post_type('campaign', array( 'labels' => array( 'name' => __("Campaigns"), 'singular_name' => __("Campaign"), ), 'rewrite' => array( 'slug' => 'campaigns', 'with_front' => FALSE, ), 'public' => TRUE, 'has_archive' => TRUE, 'supports' => array('title', 'editor', 'thumbnail'), 'publicly_queryable' => TRUE, ) );
And a custom taxonomy for categories:
register_taxonomy( 'campaign_category', 'campaign', array( 'hierarchical' => TRUE, 'label' => 'Categories', 'query_var' => TRUE, 'rewrite' => array( 'slug' => 'category', 'with_front' => FALSE, 'hierarchical' => FALSE, ), ) );
Because the post type was created with
has_achive set to
TRUE I can browse to the
/campaigns URL and my
archive-campaign.php template is triggered. So far so good.
However, when I try to access a category,
/campaigns/category/fashion, I get a
The category with the correct slug exists and I've re-saved my permalinks each time I've made a chance to any of the rewriting rules.
Any suggestions would be much appreciated.