Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

resource types

if ( ! function_exists( 'resources_taxonomy' ) ) {

// Register Custom Taxonomy
function resources_taxonomy() {

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

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

}