WebHotelier for WordPress can be used via shortcodes or via widgets.
The default shortcode is the following:
In order to add a shortcode there are many ways to do so in WordPress.
- If you use the classic editor it should look like this.
- If you use Gutenberg and you want to add it, using the shortcode block, you can can press on Shortcode as you see below.
- This shortcode will generate a form based on the values that you have provided as you can see below. For any value that has not been provided the form will assume the default values that have been set through the plugin’s admin menu. After that the only thingy you have to do is to add the shortcode like that.
- If you use Gutenberg but you want to add it as a widget block, you can do that like this.You can see in the image below how to make any customization.
All the arguments you use inside a shortcode will override the defaults that have been set through the plugin’s admin menu.
The url argument is for directing to which WebHotelier account shall the form search for availability. All WebHotelier accounts end with the domain “reserve-online.net”.
The max-adults argument is for defining the maximum number of adults that your website visitor can choose in your form. You can type any number within reason as a value. If you type 0 then there won’t be an adults selection box in the form.
The max-children argument is for defining the maximum number of children that your website visitor can choose in your form. You can type any number within reason as a value. If you type 0 then there won’t be a children selection box in the form.
The max-infants argument is for defining the maximum number of infants that your website visitor can choose in your form. You can type any number within reason as a value. If you type 0 then there won’t be an infants selection box in the form.
The orientation argument is for defining the layout of the form. You can choose between horizontal, vertical or fluid. The orientation is exclusively dependent on your design needs. The “fluid” option is a safe choice for shortcodes in case you have any doubts on what you should choose. Vertical orientation is at best in sections with small width. You can see below an example of each orientation.
The checkout-date argument is for choosing whether you would like your visitors to pick a checkout date or choose how many nights they want to spend at the hotel. Do not set it to “false” if you want to display “Nights”, instead just omit it entirely.
The max-nights argument is for defining the maximum number of nights that your website visitor can choose to spend at the hotel. You can type any number within reason as a value. However, if you have also set the “checkout-date” to true then this argument won’t have any effect.
The css-class argument is for adding a CSS Class of your choosing to the “form” element. This way you are able to target that specific form and style it however you want. You are not limited into using just one class, you can freely add multiple classes separating them by a space e.g. css-class=”my-class my-second-class”.
The days-after-checkin-allowed argument is used when you want to enforce that customers can book from your property only after the amount of days that you have specified. So if 0 is selected then the customer is allowed to check-in today, if 1 is selected then the customer is allowed to check-in one day after today, so tommorow and so on. The default value for the field is 1. An example of allowing the guests to book from the today, so that this option must be set to zero can be seen below.
The opening-closing-dates argument is used to define the period which your hotel is open, and bookings are allowed. It also assists the visitor by setting as starting date the first date that your hotel is actually open, so that there is no need to scan through the whole year to locate the dates that your hotel actually opens. We know that this is a very pleasant surprise for your guests. In order to set the dates you will have to use the following format: “YYYY-mm-dd to YYYY-mm-dd” where the first date will be the opening date while the second one will be the closing. The format is strict. For example if your hotel opens on March 15 and closes on October 20 of the year 2020, then the shortcode should look like this:
If your hotel opens on November 08 of 2019 and closes on March 18 of 2020, then the shorcode should look like this:
One important note, if you set the dates and the next year you forget to change the year in the shorcode, the plugin is smart enough to figure that out. If the dates that the hotel is open change, the plugin is not smart enough and you must change the dates for the plugin to work correctly.
You can see below an example of all the options that you can specify in a shortcode.