test_tours
// Register Custom Taxonomy
function tours() {
$labels = array(
'name' => 'Tours',
'singular_name' => 'Tours',
'menu_name' => 'Tour categories',
'all_items' => 'All Tour categories',
'parent_item' => 'Parent Tour category',
'parent_item_colon' => 'Parent Item:',
'new_item_name' => 'New Tour category',
'add_new_item' => 'Add New Tour category',
'edit_item' => 'Edit Tour category',
'update_item' => 'Update Tour category',
'view_item' => 'View Tour category',
'separate_items_with_commas' => 'Separate items with commas',
'add_or_remove_items' => 'Add or remove items',
'choose_from_most_used' => 'Choose from the most used',
'popular_items' => 'Popular Tour categories',
'search_items' => 'Search Tour categories',
'not_found' => 'Not Found',
'no_terms' => 'No Tour categories',
'items_list' => 'Items list',
'items_list_navigation' => 'Items list navigation',
);
$rewrite = array(
'slug' => 'tours',
'with_front' => true,
'hierarchical' => false,
);
$capabilities = array(
'manage_terms' => 'manage_categories',
'edit_terms' => 'manage_categories',
'delete_terms' => 'manage_categories',
'assign_terms' => 'edit_posts',
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'query_var' => 'tours',
'rewrite' => $rewrite,
'capabilities' => $capabilities,
);
register_taxonomy( 'tours', array( 'tour' ), $args );
}
add_action( 'init', 'tours', 0 );