Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Cocktail Served Taxonomy

Taxonomy to categorize cocktails by how they’re served: Crushed Ice, On The Rocks, Frozen, Hot/Warm, Neat/Up

if ( ! function_exists( 'cocktail_served_taxonomy' ) ) {

// Register Custom Taxonomy
function cocktail_served_taxonomy() {

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

}

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

}