OCTA Hotel Category Taxonomy
// Register Custom Taxonomy
function octa_register_taxonomy_hotel_category() {
$labels = array(
'name' => _x( 'Hotel Categories', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'Hotel Category', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Hotel Categories', 'text_domain' ),
'all_items' => __( 'All Hotel Categories', 'text_domain' ),
'parent_item' => __( 'Parent Hotel Category', 'text_domain' ),
'parent_item_colon' => __( 'Parent Hotel Category:', 'text_domain' ),
'new_item_name' => __( 'New Hotel Category Name', 'text_domain' ),
'add_new_item' => __( 'Add New Hotel Category', 'text_domain' ),
'edit_item' => __( 'Edit Hotel Category', 'text_domain' ),
'update_item' => __( 'Update Hotel Category', 'text_domain' ),
'view_item' => __( 'View Hotel Category', 'text_domain' ),
'separate_items_with_commas' => __( 'Separate Hotel Categories with commas', 'text_domain' ),
'add_or_remove_items' => __( 'Add or remove Hotel Categories', 'text_domain' ),
'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),
'popular_items' => __( 'Popular Hotel Categories', 'text_domain' ),
'search_items' => __( 'Search Hotel Categories', 'text_domain' ),
'not_found' => __( 'Not Found', 'text_domain' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => false,
'show_tagcloud' => true,
);
register_taxonomy( 'hotel-category', array( 'hotel' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'octa_register_taxonomy_hotel_category', 0 );