Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Cocktail Taste Taxonomy

if ( ! function_exists( 'cocktail_taste_taxonomy' ) ) {

// Register Custom Taxonomy
function cocktail_taste_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Tastes', 'Taxonomy General Name', 'gustologist' ),
		'singular_name'              => _x( 'Taste', 'Taxonomy Singular Name', 'gustologist' ),
		'menu_name'                  => __( 'Tastes', 'gustologist' ),
		'all_items'                  => __( 'All Tastes', 'gustologist' ),
		'parent_item'                => __( 'Parent Taste', 'gustologist' ),
		'parent_item_colon'          => __( 'Parent Taste:', 'gustologist' ),
		'new_item_name'              => __( 'New Taste', 'gustologist' ),
		'add_new_item'               => __( 'Add New Taste', 'gustologist' ),
		'edit_item'                  => __( 'Edit Taste', 'gustologist' ),
		'update_item'                => __( 'Update Taste', 'gustologist' ),
		'view_item'                  => __( 'View Taste', 'gustologist' ),
		'separate_items_with_commas' => __( 'Separate tastes with commas', 'gustologist' ),
		'add_or_remove_items'        => __( 'Add or remove tastes', 'gustologist' ),
		'choose_from_most_used'      => __( 'Choose from the most used tastes', 'gustologist' ),
		'popular_items'              => __( 'Popular Tastes', 'gustologist' ),
		'search_items'               => __( 'Search Tastes', 'gustologist' ),
		'not_found'                  => __( 'No Tastes Found', 'gustologist' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => false,
		'show_tagcloud'              => false,
	);
	register_taxonomy( 'ct_taste', array( 'cocktails' ), $args );

}

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

}