I have a custom post type called "work" and it has a taxonomy called "categories". Currently "/work" and "/work/category_slug/work_slug" works great. However "/work/category_slug" does not. I get a 404 page. Any ideas what I can do?
register_post_type('work', array(
'label' => 'Work',
'description' => '',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'work', 'with_front' => true),
'query_var' => true,
'has_archive' => true,
'supports' => array('title','editor','custom-fields','comments','revisions','page-attributes'),
'taxonomies' => array('categories'),
'labels' => array (
'name' => 'Work',
'singular_name' => 'work',
'menu_name' => 'Work',
'add_new' => 'Add New',
'add_new_item' => 'Add New Item',
'edit' => 'Edit ',
'edit_item' => 'Edit Item',
'new_item' => 'New Item',
'view' => 'View',
'view_item' => 'View Item',
'search_items' => 'Search Items',
'not_found' => 'No Work Items Found',
'not_found_in_trash' => 'No Work Items found in Trash',
'parent' => 'Parent Work Item',
)
) );
register_taxonomy( 'categories',array (
0 => 'work',
),
array( 'hierarchical' => true,
'label' => 'Categories',
'show_ui' => true,
'query_var' => true,
'show_admin_column' => false,
'labels' => array (
'search_items' => 'Category',
'popular_items' => '',
'all_items' => '',
'parent_item' => '',
'parent_item_colon' => '',
'edit_item' => '',
'update_item' => '',
'add_new_item' => '',
'new_item_name' => '',
'separate_items_with_commas' => '',
'add_or_remove_items' => '',
'choose_from_most_used' => '',
)
) );