Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Taxonomy

// Register Custom Taxonomy
function custom_taxonomy() {

	$labels = array(
		'name'                       => 'Resource Types',
		'singular_name'              => 'Resource Type',
		'menu_name'                  => 'Resource Type',
		'all_items'                  => 'All Resource Types',
		'parent_item'                => 'Parent Resource Type',
		'parent_item_colon'          => 'Parent Resource Type:',
		'new_item_name'              => 'New Resource Type',
		'add_new_item'               => 'Add New Resource Type',
		'edit_item'                  => 'Edit Resource Type',
		'update_item'                => 'Update Resource Type',
		'separate_items_with_commas' => 'Separate items with commas',
		'search_items'               => 'Search Items',
		'add_or_remove_items'        => 'Add or remove items',
		'choose_from_most_used'      => 'Choose from the most used items',
		'not_found'                  => 'Not Found',
	);
	$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( 'type', array( 'resource' ), $args );

}

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