Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Cocktail Themes Taxonomy

if ( ! function_exists( 'cocktail_theme_taxonomy' ) ) {

// Register Custom Taxonomy
function cocktail_theme_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Themes', 'Taxonomy General Name', 'gustologist' ),
		'singular_name'              => _x( 'Theme', 'Taxonomy Singular Name', 'gustologist' ),
		'menu_name'                  => __( 'Theme', 'gustologist' ),
		'all_items'                  => __( 'All Themes', 'gustologist' ),
		'parent_item'                => __( 'Parent Theme', 'gustologist' ),
		'parent_item_colon'          => __( 'Parent Theme:', 'gustologist' ),
		'new_item_name'              => __( 'New Themes', 'gustologist' ),
		'add_new_item'               => __( 'Add Theme', 'gustologist' ),
		'edit_item'                  => __( 'Edit Theme', 'gustologist' ),
		'update_item'                => __( 'Update Theme', 'gustologist' ),
		'view_item'                  => __( 'View Theme', 'gustologist' ),
		'separate_items_with_commas' => __( 'Separate themes with commas', 'gustologist' ),
		'add_or_remove_items'        => __( 'Add or remove themes', 'gustologist' ),
		'choose_from_most_used'      => __( 'Choose from the most themes', 'gustologist' ),
		'popular_items'              => __( 'Popular Themes', 'gustologist' ),
		'search_items'               => __( 'Search Themes', 'gustologist' ),
		'not_found'                  => __( 'Not 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_theme', array( 'cocktails' ), $args );

}

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

}