Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Band Categories

if ( ! function_exists( 'custom_taxonomy' ) ) {

// Register Custom Taxonomy
function custom_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Categories', 'Taxonomy General Name', 'band_plugin' ),
		'singular_name'              => _x( 'Category', 'Taxonomy Singular Name', 'band_plugin' ),
		'menu_name'                  => __( 'Categories', 'band_plugin' ),
		'all_items'                  => __( 'All Categories', 'band_plugin' ),
		'parent_item'                => __( 'Parent Category', 'band_plugin' ),
		'parent_item_colon'          => __( 'Parent Category:', 'band_plugin' ),
		'new_item_name'              => __( 'New Category Name', 'band_plugin' ),
		'add_new_item'               => __( 'Add New Category', 'band_plugin' ),
		'edit_item'                  => __( 'Edit Category', 'band_plugin' ),
		'update_item'                => __( 'Update Category', 'band_plugin' ),
		'view_item'                  => __( 'View Category', 'band_plugin' ),
		'separate_items_with_commas' => __( 'Separate categories with commas', 'band_plugin' ),
		'add_or_remove_items'        => __( 'Add or remove categories', 'band_plugin' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'band_plugin' ),
		'popular_items'              => __( 'Popular Categories', 'band_plugin' ),
		'search_items'               => __( 'Search Categories', 'band_plugin' ),
		'not_found'                  => __( 'Not Found', 'band_plugin' ),
		'no_terms'                   => __( 'No categories', 'band_plugin' ),
		'items_list'                 => __( 'Categories list', 'band_plugin' ),
		'items_list_navigation'      => __( 'Categories list navigation', 'band_plugin' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
	);
	register_taxonomy( 'band_category', array( 'bands' ), $args );

}
add_action( 'init', 'custom_taxonomy', 0 );

}