Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Cocktail Strength Taxonomy

if ( ! function_exists( 'cocktail_strength_taxonomy' ) ) {

// Register Custom Taxonomy
function cocktail_strength_taxonomy() {

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

}

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

}