Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Recipe Collection

A group of instructions to mix foods mix together to make more complicated foods

// Register Custom Taxonomy
function collection_cpt() {

	$labels = array(
		'name'                       => _x( 'Collections', 'Taxonomy General Name', 'bones' ),
		'singular_name'              => _x( 'Collection', 'Taxonomy Singular Name', 'bones' ),
		'menu_name'                  => __( 'Collection', 'bones' ),
		'all_items'                  => __( 'All Collections', 'bones' ),
		'parent_item'                => __( 'Parent Collection', 'bones' ),
		'parent_item_colon'          => __( 'Parent Collection:', 'bones' ),
		'new_item_name'              => __( 'New Collection Name', 'bones' ),
		'add_new_item'               => __( 'Add New Collection', 'bones' ),
		'edit_item'                  => __( 'Edit Collection', 'bones' ),
		'update_item'                => __( 'Update Collection', 'bones' ),
		'separate_items_with_commas' => __( 'Separate collections with commas', 'bones' ),
		'search_items'               => __( 'Search Collection', 'bones' ),
		'add_or_remove_items'        => __( 'Add or remove collections', 'bones' ),
		'choose_from_most_used'      => __( 'Choose from the most used collections', 'bones' ),
		'not_found'                  => __( 'Not Found', 'bones' ),
	);
	$rewrite = array(
		'slug'                       => 'collections',
		'with_front'                 => true,
		'hierarchical'               => true,
	);
	$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,
	);
	register_taxonomy( 'collection', array( 'recipe' ), $args );

}

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