Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Avallaire Location Cities

if ( ! function_exists( 'avallaire_cities' ) ) {

// Register Custom Taxonomy
function avallaire_cities() {

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

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

}