Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom Workshop Category Taxonomy

// Register Custom Taxonomy
function custom_workshop_category_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Workshop Categories', 'Taxonomy General Name', 'taller' ),
		'singular_name'              => _x( 'Workshop Category', 'Taxonomy Singular Name', 'taller' ),
		'menu_name'                  => __( 'Workshop Categories', 'taller' ),
		'all_items'                  => __( 'All Workshop Categories', 'taller' ),
		'parent_item'                => __( 'Parent Workshop Category', 'taller' ),
		'parent_item_colon'          => __( 'Parent Workshop Category:', 'taller' ),
		'new_item_name'              => __( 'New Workshop Category Name', 'taller' ),
		'add_new_item'               => __( 'Add New Workshop Category', 'taller' ),
		'edit_item'                  => __( 'Edit Workshop Category', 'taller' ),
		'update_item'                => __( 'Update Workshop Category', 'taller' ),
		'view_item'                  => __( 'View Workshop Category', 'taller' ),
		'separate_items_with_commas' => __( 'Separate workshop ategories with commas', 'taller' ),
		'add_or_remove_items'        => __( 'Add or remove workshop categories', 'taller' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'taller' ),
		'popular_items'              => __( 'Popular Workshop Categories', 'taller' ),
		'search_items'               => __( 'Search Workshop Categories', 'taller' ),
		'not_found'                  => __( 'Not Found', 'taller' ),
		'no_terms'                   => __( 'No workshop categories', 'taller' ),
		'items_list'                 => __( 'Workshop Categories list', 'taller' ),
		'items_list_navigation'      => __( 'Workshop Categories list navigation', 'taller' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
	);
	register_taxonomy( 'workshop-category', array( 'workshop' ), $args );

}
add_action( 'init', 'custom_workshop_category_taxonomy', 0 );