Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Specialism Taxonomy

if ( ! function_exists( 'gep_taxonomy' ) ) {

// Register Custom Taxonomy
function gep_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Document Types', 'Taxonomy General Name', 'gep_post_types' ),
		'singular_name'              => _x( 'Document Type', 'Taxonomy Singular Name', 'gep_post_types' ),
		'menu_name'                  => __( 'Document Type', 'gep_post_types' ),
		'all_items'                  => __( 'All Document Types', 'gep_post_types' ),
		'parent_item'                => __( 'Parent Document Type', 'gep_post_types' ),
		'parent_item_colon'          => __( 'Parent Document Types:', 'gep_post_types' ),
		'new_item_name'              => __( 'New Document Type Name', 'gep_post_types' ),
		'add_new_item'               => __( 'Add New Document Type', 'gep_post_types' ),
		'edit_item'                  => __( 'Edit Document Type', 'gep_post_types' ),
		'update_item'                => __( 'Update Document Type', 'gep_post_types' ),
		'view_item'                  => __( 'View Document Type', 'gep_post_types' ),
		'separate_items_with_commas' => __( 'Separate document types with commas', 'gep_post_types' ),
		'add_or_remove_items'        => __( 'Add or remove document types', 'gep_post_types' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'gep_post_types' ),
		'popular_items'              => __( 'Popular Document Types', 'gep_post_types' ),
		'search_items'               => __( 'Search Document Types', 'gep_post_types' ),
		'not_found'                  => __( 'Not Found', 'gep_post_types' ),
		'no_terms'                   => __( 'No document types', 'gep_post_types' ),
		'items_list'                 => __( 'Document Types list', 'gep_post_types' ),
		'items_list_navigation'      => __( 'Document Types list navigation', 'gep_post_types' ),
	);
	$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( 'doc_type', array( 'document' ), $args );

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

}