Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Chef Taxonomy

if ( ! function_exists( 'chef_taxonomy' ) ) {

// Register Custom Taxonomy
function chef_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Chefs', 'Taxonomy General Name', 'chef_tax' ),
		'singular_name'              => _x( 'Chef', 'Taxonomy Singular Name', 'chef_tax' ),
		'menu_name'                  => __( 'Chefs', 'chef_tax' ),
		'all_items'                  => __( 'All Chefs', 'chef_tax' ),
		'parent_item'                => __( 'Parent Chef', 'chef_tax' ),
		'parent_item_colon'          => __( 'Parent Chef:', 'chef_tax' ),
		'new_item_name'              => __( 'New Chef Name', 'chef_tax' ),
		'add_new_item'               => __( 'Add New Chef', 'chef_tax' ),
		'edit_item'                  => __( 'Edit Chef', 'chef_tax' ),
		'update_item'                => __( 'Update Chef', 'chef_tax' ),
		'separate_items_with_commas' => __( 'Separate Chef with commas', 'chef_tax' ),
		'search_items'               => __( 'Search Chefs', 'chef_tax' ),
		'add_or_remove_items'        => __( 'Add or remove Chefs', 'chef_tax' ),
		'choose_from_most_used'      => __( 'Choose from the most used Chefs', 'chef_tax' ),
		'not_found'                  => __( 'Not Found', 'chef_tax' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
	);
	register_taxonomy( 'chef', array( 'post' ), $args );

}

// Hook into the 'init' action
add_action( 'init', 'chef_taxonomy', 0 );

}