Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom Taxonomy

Custom Taxonomy

if ( ! function_exists( 'et_video_level' ) ) {

// Register Custom Taxonomy
function et_video_level() {

	$labels = array(
		'name'                       => 'Levels',
		'singular_name'              => 'Level',
		'menu_name'                  => 'Levels',
		'all_items'                  => 'All Levels',
		'parent_item'                => 'Parent Level',
		'parent_item_colon'          => 'Parent Level:',
		'new_item_name'              => 'New Level Name',
		'add_new_item'               => 'Add New Level',
		'edit_item'                  => 'Edit Level',
		'update_item'                => 'Update Level',
		'view_item'                  => 'View Level',
		'separate_items_with_commas' => 'Separate items with commas',
		'add_or_remove_items'        => 'Add or remove videos',
		'choose_from_most_used'      => 'Choose from the most used',
		'popular_items'              => 'Popular Levels',
		'search_items'               => 'Search Level',
		'not_found'                  => 'Not Found',
		'no_terms'                   => 'No items',
		'items_list'                 => 'Levels list',
		'items_list_navigation'      => 'Levels list navigation',
	);
	$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( 'level', array( 'video', 'videos' ), $args );

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

}