Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Team Members Organisation Taxonomy

A taxonomy for the Team Members custom post type.

if ( ! function_exists( 'wf_tax_team_members' ) ) {

// Register Custom Taxonomy
function wf_tax_team_members() {

	$labels = array(
		'name'                       => _x( 'Organisations', 'Taxonomy General Name', 'bb-theme' ),
		'singular_name'              => _x( 'Organisation', 'Taxonomy Singular Name', 'bb-theme' ),
		'menu_name'                  => __( 'Organisations', 'bb-theme' ),
		'all_items'                  => __( 'All Organisations', 'bb-theme' ),
		'parent_item'                => __( 'Parent Organisation', 'bb-theme' ),
		'parent_item_colon'          => __( 'Parent Organisation:', 'bb-theme' ),
		'new_item_name'              => __( 'New Organisation Name', 'bb-theme' ),
		'add_new_item'               => __( 'Add New Organisation', 'bb-theme' ),
		'edit_item'                  => __( 'Edit Organisation', 'bb-theme' ),
		'update_item'                => __( 'Update Organisation', 'bb-theme' ),
		'view_item'                  => __( 'View Organisation', 'bb-theme' ),
		'separate_items_with_commas' => __( 'Separate organisations with commas', 'bb-theme' ),
		'add_or_remove_items'        => __( 'Add or remove organisations', 'bb-theme' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'bb-theme' ),
		'popular_items'              => __( 'Popular Organisations', 'bb-theme' ),
		'search_items'               => __( 'Search Organisations', 'bb-theme' ),
		'not_found'                  => __( 'Not Found', 'bb-theme' ),
		'no_terms'                   => __( 'No organisations', 'bb-theme' ),
		'items_list'                 => __( 'Organisations list', 'bb-theme' ),
		'items_list_navigation'      => __( 'Organisations list navigation', 'bb-theme' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'organisation', array( 'team-member' ), $args );

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

}