WordPress Taxonomy Causing Pages to 404

I have the following code to create a custom post type and a custom taxonomy associated with that post type:

register_post_type('deals', array(  
'label' => 'Deals',
'description' => '',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'hierarchical' => true,
'rewrite' => array('slug' => "%make%", 'with_front' => false),
'query_var' => true,
'has_archive' => 'deals',
'exclude_from_search' => false,
'menu_position' => 4,
'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes','sticky'),
'labels' => array (
    'name' => 'Deals',
      'singular_name' => 'Deal',
      'menu_name' => 'Deals',
      'all_items' => 'All Deals',
      'add_new' => 'Add Deal',
      'add_new_item' => 'Add New Deal',
      'edit' => 'Edit',
      'edit_item' => 'Edit Deal',
      'new_item' => 'New Deal',
      'view' => 'View Deal',
      'view_item' => 'View Deal',
      'search_items' => 'Search Deals',
      'not_found' => 'No Deals Found',
      'not_found_in_trash' => 'No Deals Found in Trash',
      'parent' => 'Parent Deal',
),) );

$labels = array(
'name' => _x( 'Makes', 'taxonomy general name' ),
'singular_name' => _x( 'Make', 'taxonomy singular name' ),
'search_items' =>  __( 'Search Makes' ),
'all_items' => __( 'All Makes' ),
'parent_item' => __( 'Parent Make' ),
'parent_item_colon' => __( 'Parent Make:' ),
'edit_item' => __( 'Edit Make' ), 
'update_item' => __( 'Update Make' ),
'add_new_item' => __( 'Add New Make' ),
'new_item_name' => __( 'New Make Name' ),
'menu_name' => __( 'Make' ),
);  

register_taxonomy('make',array('deals'), array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'make' ),
'has_archive' => 'make'
 ));

And as you can see from the live site that works great: http://www.yourcardeals.co.uk/nissan-deals/

Read More

The issue I have is that it is causing regular pages to 404 i.e. http://www.yourcardeals.co.uk/manufacturers/

I have flushed Permalinks and do not have any pages or categories with the same name or slug as any taxonomies or custom post types.

Any ideas on what might be causing this?

Related posts

Leave a Reply