Chapter Grouping Taxonomy
if ( ! function_exists( 'sw_register_chapter_grouping_taxonomy' ) ) {
// Register Custom Taxonomy
function sw_register_chapter_grouping_taxonomy() {
$labels = array(
'name' => 'Chapter Grouping',
'singular_name' => 'Chapter Group',
'menu_name' => 'Chapter Grouping',
'all_items' => 'All Chapter Groups',
'parent_item' => '',
'parent_item_colon' => '',
'new_item_name' => 'New Chapter Group',
'add_new_item' => 'Add New Chapter Group',
'edit_item' => 'Edit Chapter Group',
'update_item' => 'Update Chapter Group',
'view_item' => 'View Chapter Group',
'separate_items_with_commas' => 'Separate Chapter Groups with commas',
'add_or_remove_items' => 'Add or remove Chapter Groups',
'choose_from_most_used' => 'Choose from the most used',
'popular_items' => 'Popular Chapter Groups',
'search_items' => 'Search Chapter Groups',
'not_found' => 'Not Found',
'no_terms' => 'No Chapter Groups',
'items_list' => 'Chapter Groups list',
'items_list_navigation' => 'Chapter Groups list navigation',
);
$rewrite = array(
'slug' => 'state',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => $rewrite,
);
register_taxonomy( 'chapter_grouping', array( 'chapters' ), $args );
}
add_action( 'init', 'sw_register_chapter_grouping_taxonomy', 0 );
}