Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Collection Type Taxonomoy

The Collection Type Taxonomy defines the type of information collection for the Collections C.P.T.

if ( ! function_exists( 'hms_taxonomies' ) ) {

// Register Custom Taxonomy
function hms_taxonomies() {

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

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

}