Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Airport

if ( ! function_exists( 'custom_airport' ) ) {

// Register Custom Taxonomy
function custom_airport() {

	$labels = array(
		'name'                       => _x( 'Airport', 'Taxonomy General Name', 'mnxonline' ),
		'singular_name'              => _x( 'Airport', 'Taxonomy Singular Name', 'mnxonline' ),
		'menu_name'                  => __( 'Airport', 'mnxonline' ),
		'all_items'                  => __( 'All Airports', 'mnxonline' ),
		'parent_item'                => __( '', 'mnxonline' ),
		'parent_item_colon'          => __( '', 'mnxonline' ),
		'new_item_name'              => __( 'New Airport Name', 'mnxonline' ),
		'add_new_item'               => __( 'Add New Airport', 'mnxonline' ),
		'edit_item'                  => __( 'Edit Airport', 'mnxonline' ),
		'update_item'                => __( 'Update Airport', 'mnxonline' ),
		'view_item'                  => __( 'View Airport', 'mnxonline' ),
		'separate_items_with_commas' => __( 'Separate Airports with commas', 'mnxonline' ),
		'add_or_remove_items'        => __( 'Add or remove Airports', 'mnxonline' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'mnxonline' ),
		'popular_items'              => __( 'Popular Airports', 'mnxonline' ),
		'search_items'               => __( 'Search Airports', 'mnxonline' ),
		'not_found'                  => __( 'Not Found', 'mnxonline' ),
		'no_terms'                   => __( 'No Airport', 'mnxonline' ),
		'items_list'                 => __( 'Airports list', 'mnxonline' ),
		'items_list_navigation'      => __( 'Airports list navigation', 'mnxonline' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'update_count_callback'      => 'airport_count_updated',
	);
	register_taxonomy( 'airport', array( 'connection' ), $args );

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

}