There are 3 methods to add shortcode filter rooms. Let’s check each one and find the best option for you.
Method 1: Add a shortcode via the archive page rooms
You can add a shortcode filter on the archive rooms page. Please follow these steps to add the shortcode:
Step 1: Go to the Hotel Rooms page and click Edit.
Step 2: Click on the + icon and search for Shortcode. Click it to add the Shortcode block to the page.
Step 3: Copy and paste the shortcode [hotel_booking_filter] into the box provided. Don’t forget to click the Update button to update your changes.
Method 2: Add a shortcode via widgets
Step 1: Open your WordPress admin dashboard, go to Appearance >> Widgets >> Text >> Search Room Sidebar >> Add Widgets.
Step 2: Copy and paste the shortcode [hotel_booking_filter] into the Text part and Save it.
Method 3: Add a shortcode via Elementor
Step 1: Go to your WordPress dashboard and find Pages >> All Pages >> Hotel Rooms – Elementor and click Edit with Elementor link to add a shortcode.
Step 2: Search for Shortcode and select it.
Step 3: Type or paste the shortcode [hotel_booking_filter] into the box provided and Update.
After adding a shortcode successfully, the filter rooms will be displayed at the corresponding location:
There are 3 filter types:
- Filter by price
- Filter by rating
- Filter by attributes
1. Filter by price
To set up the Min-Max price, simply go to your admin dashboard and find WP Hotel Booking >> Settings >> Advanced and set the min and max amount and Update.
The price range slider will start and end according to the Min – Max Price value set in your backend.
To filter rooms by price, please select your specific price range and click Apply. The system will filter and display rooms that match that criteria.
2. Filter by rating
The number of rooms will be displayed at the end of each rating. There are 6 rating types to choose from:
- 1 star
- 2 stars
- 3 stars
- 4 stars
- 5 stars
- Unrated
After selecting the rating type, the website will filter and display rooms with the corresponding rating:
3. Filter by attributes
The rooms type option displays will depend on the backend you set. After selecting the room type, the website will show the matching room type after you select the room type.