Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

T2S – organisations

// Register Custom Taxonomy
function add_organisations() {

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

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