Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Exhibitions Taxonomy

// Register Custom Taxonomy
function register_exhibitions_taxonomy() {

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

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