Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Training Category

// Register Custom Taxonomy
function bp_pt_custom_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Training Categories', 'Taxonomy General Name', 'bp-profile-training' ),
		'singular_name'              => _x( 'Training Category', 'Taxonomy Singular Name', 'bp-profile-training' ),
		'menu_name'                  => __( 'Training Category', 'bp-profile-training' ),
		'all_items'                  => __( 'All Training Categories', 'bp-profile-training' ),
		'parent_item'                => __( 'Parent Training Category', 'bp-profile-training' ),
		'parent_item_colon'          => __( 'Parent Training Category:', 'bp-profile-training' ),
		'new_item_name'              => __( 'New Training Category Name', 'bp-profile-training' ),
		'add_new_item'               => __( 'Add New Training Category', 'bp-profile-training' ),
		'edit_item'                  => __( 'Edit Training Category', 'bp-profile-training' ),
		'update_item'                => __( 'Update Training Category', 'bp-profile-training' ),
		'separate_items_with_commas' => __( 'Separate training categories with commas', 'bp-profile-training' ),
		'search_items'               => __( 'Search Training Categories', 'bp-profile-training' ),
		'add_or_remove_items'        => __( 'Add or remove training categories', 'bp-profile-training' ),
		'choose_from_most_used'      => __( 'Choose from the most used training categories', 'bp-profile-training' ),
		'not_found'                  => __( 'Training Category Not Found', 'bp-profile-training' ),
	);
	$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( 'training_cat', array( 'bp_pt_training' ), $args );

}

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