if ( ! function_exists('bnb_rooms') ) { // Register Custom Post Type function bnb_rooms() { $labels = array( 'name' => _x( 'Rooms', 'Post Type General Name', 'bnb_rooms' ), 'singular_name' => _x( 'Romm', 'Post Type Singular Name', 'bnb_rooms' ), 'menu_name' => __( 'Rooms', 'bnb_rooms' ), 'name_admin_bar' => __( 'Room', 'bnb_rooms' ), 'archives' => __( 'Item Archives', 'bnb_rooms' ), 'attributes' => __( 'Item Attributes', 'bnb_rooms' ), 'parent_item_colon' => __( 'Parent Room', 'bnb_rooms' ), 'all_items' => __( 'All Room', 'bnb_rooms' ), 'add_new_item' => __( 'Add New Room', 'bnb_rooms' ), 'add_new' => __( 'Add New', 'bnb_rooms' ), 'new_item' => __( 'New Room', 'bnb_rooms' ), 'edit_item' => __( 'Edit Room', 'bnb_rooms' ), 'update_item' => __( 'Update Room', 'bnb_rooms' ), 'view_item' => __( 'View Room', 'bnb_rooms' ), 'view_items' => __( 'View Rooms', 'bnb_rooms' ), 'search_items' => __( 'Search Room', 'bnb_rooms' ), 'not_found' => __( 'Not found', 'bnb_rooms' ), 'not_found_in_trash' => __( 'Not found in Trash', 'bnb_rooms' ), 'featured_image' => __( 'Featured Image', 'bnb_rooms' ), 'set_featured_image' => __( 'Set featured image', 'bnb_rooms' ), 'remove_featured_image' => __( 'Remove featured image', 'bnb_rooms' ), 'use_featured_image' => __( 'Use as featured image', 'bnb_rooms' ), 'insert_into_item' => __( 'Insert into item', 'bnb_rooms' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'bnb_rooms' ), 'items_list' => __( 'Items list', 'bnb_rooms' ), 'items_list_navigation' => __( 'Items list navigation', 'bnb_rooms' ), 'filter_items_list' => __( 'Filter items list', 'bnb_rooms' ), ); $rewrite = array( 'slug' => 'room', 'with_front' => true, 'pages' => true, 'feeds' => false, ); $args = array( 'label' => __( 'Romm', 'bnb_rooms' ), 'description' => __( 'Create Rooms', 'bnb_rooms' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'page-attributes' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-format-image', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => '', 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'bnb_rooms', $args ); } add_action( 'init', 'bnb_rooms', 0 ); }