Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Amenity

Amenities for Lodging Businesses

if ( ! function_exists( 'custom_amenity' ) ) {

// Register Custom Taxonomy
function custom_amenity() {

	$labels = array(
		'name'                       => _x( 'Amenities', 'Taxonomy General Name', 'mnxonline' ),
		'singular_name'              => _x( 'Amenity', 'Taxonomy Singular Name', 'mnxonline' ),
		'menu_name'                  => __( 'Amenity', 'mnxonline' ),
		'all_items'                  => __( 'All Amenities', 'mnxonline' ),
		'parent_item'                => __( 'Parent Amenity', 'mnxonline' ),
		'parent_item_colon'          => __( 'Parent Amenity:', 'mnxonline' ),
		'new_item_name'              => __( 'New Amenity Name', 'mnxonline' ),
		'add_new_item'               => __( 'Add New Amenity', 'mnxonline' ),
		'edit_item'                  => __( 'Edit Amenity', 'mnxonline' ),
		'update_item'                => __( 'Update Amenity', 'mnxonline' ),
		'view_item'                  => __( 'View Amenity', 'mnxonline' ),
		'separate_items_with_commas' => __( 'Separate Amenities with commas', 'mnxonline' ),
		'add_or_remove_items'        => __( 'Add or remove Amenities', 'mnxonline' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'mnxonline' ),
		'popular_items'              => __( 'Popular Amenities', 'mnxonline' ),
		'search_items'               => __( 'Search Amenities', 'mnxonline' ),
		'not_found'                  => __( 'Not Found', 'mnxonline' ),
		'no_terms'                   => __( 'No Amenity', 'mnxonline' ),
		'items_list'                 => __( 'Amenities list', 'mnxonline' ),
		'items_list_navigation'      => __( 'Amenities 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,
	);
	register_taxonomy( 'amenity', array( 'localbusiness' ), $args );

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

}