Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Expert Taxonomy

if ( ! function_exists( 'expert_taxonomy' ) ) {

// Register Custom Taxonomy
function expert_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Experts', 'Taxonomy General Name', 'pulse' ),
		'singular_name'              => _x( 'Expert', 'Taxonomy Singular Name', 'pulse' ),
		'menu_name'                  => __( 'Expert', 'pulse' ),
		'all_items'                  => __( 'All Experts', 'pulse' ),
		'parent_item'                => __( 'Parent Expert', 'pulse' ),
		'parent_item_colon'          => __( 'Parent Expert:', 'pulse' ),
		'new_item_name'              => __( 'New Expert Name', 'pulse' ),
		'add_new_item'               => __( 'Add New Expert', 'pulse' ),
		'edit_item'                  => __( 'Edit Expert', 'pulse' ),
		'update_item'                => __( 'Update Expert', 'pulse' ),
		'separate_items_with_commas' => __( 'Separate experts with commas', 'pulse' ),
		'search_items'               => __( 'Search experts', 'pulse' ),
		'add_or_remove_items'        => __( 'Add or remove experts', 'pulse' ),
		'choose_from_most_used'      => __( 'Choose from the most used experts', 'pulse' ),
		'not_found'                  => __( 'No Experts Found', 'pulse' ),
	);
	$rewrite = array(
		'slug'                       => 'experts',
		'with_front'                 => true,
		'hierarchical'               => true,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
		'update_count_callback'      => 'A function name that will be called when the count of an associated Post Type is updated.',	);
	register_taxonomy( 'expert', 'custom_post_type', $args );

}

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

}