Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Taxonomy: Gallery Categories (CNYC)

Gallery Categories, legacy taxonomy for CNYC.

if ( ! function_exists( 'taxonomy_gallerycategories' ) ) {

// Register Custom Taxonomy
function taxonomy_gallerycategories() {

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

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

}