Kriuchko
12/11/2019 - 11:16 AM

Register taxonomy custom taxonomy


$labels = array(
	'singular_name'     => __( 'Dish Type' ),
	'search_items'      => __( 'Search Dish Type'),
	'all_items'         => __( 'All Dish Types'),
	'parent_item'       => __( 'Parent Dish Type'),
	'parent_item_colon' => __( 'Parent Dish Type:'),
	'edit_item'         => __( 'Edit Dish Type'),
	'update_item'       => __( 'Update Dish Type'),
	'add_new_item'      => __( 'Add New Dish Type'),
	'new_item_name'     => __( 'New Dish Type'),
	'menu_name'         => __( 'Dish Type'),
);

register_taxonomy(
	'dish-type',
	'recipe',
	array('label' => 'Dish Type',
			'labels' => $labels,
  		'hierarchical' => true,
  		'query_var' => true)
);