The shortcode
A shortcode is a code that you can add anywhere on your site. On your website’s front-end, this code will be replaced by the calendar.
This is an example of the shortcode containing all the available parameters.
The parameters
Parameter | Values | Default | Description |
---|---|---|---|
id |
the ID of the calendar | none | This will let the shortcode know which calendar to embed. You can find your calendar IDs in WP Booking System → Calendars |
form_id |
the ID of the form | 0 |
This will let the shortcode know which form to attach to the calendar. You can find your form IDs in WP Booking System → Forms. Calendars can be embedded without a form, in which case it won’t allow the customer to make bookings, the calendar will just display the availability. |
title |
yes/no |
yes |
Displays the calendar title as a heading above the calendar |
legend |
yes/no |
yes |
Displays the calendar’s legend items |
legend_position |
side/top/bottom |
side |
The position of the calendar legend. Can be to the side of the calendar, above the calendar or below the calendar. |
display |
any positive integer |
1 |
The number of calendar months to be displayed |
year |
0 or 1970-2100 |
0 |
The starting year of the calendar. 0 (zero) means the current year will be displayed. |
month |
0-12 |
0 |
The starting month of the calendar. 0 (zero) means the current month will be displayed. |
show_first_available_date |
yes/no |
no |
Jump to the month with first available bookable date. |
language |
auto or 2 letter language code |
auto |
The language in which to display the calendar and form. With auto the plugin tries to detect your website’s language automatically. |
start |
1-7 |
1 |
The starting day of the week. 1 to 7 = Monday to Sunday |
dropdown |
yes/no |
yes |
Display the month navigation dropdown in the first calendar |
jump |
yes/no |
no |
Makes the arrow navigation change all the visible months instead of just one at a time. Used in combination with the display parameter. |
history |
1,2,3 |
1 |
Handles the past dates in the calendar.
|
tooltip |
1,2,3 |
1 |
Handles the tooltips in the calendar
|
highlighttoday |
yes/no |
no |
Highlight today’s date in the calendar |
weeknumbers |
yes/no |
no |
Show the week numbers in the calendar |
show_prices |
yes/no |
no |
Show the daily price for each day. Only works if pricing is enabled. |
form_position |
side/bottom |
bottom |
The position of the booking form |
auto_pending |
yes/no |
yes |
Handles what happens to the booked dates after the booking is made. If set to yes , the dates will be marked as unavailable in order to prevent double bookings. If the Inventory add-on is installed, the dates will be marked as unavailable only when the inventory reaches 0. |
selection_type |
single/multiple |
multiple |
Handles the date selection in the calendar. The multiple option is used for selecting a date range by requiring the customer to click on the starting date and the ending date. The single option selects one day with a single click. |
selection_style |
normal/split |
split |
Handles the date selection style. The normal parameter selects full days, while the split parameter marks the starting and ending days of the selection as half days or changeover days. When using pricing, normal counts days and split counts nights. |
minimum_days |
any positive integer |
0 |
Sets a restriction for the minimum days that must be booked. If the Booking Restrictions add-on is installed, this parameter is ignored. |
maximum_days |
any positive integer |
0 |
Sets a restriction for the maximum days that must be booked. If the Booking Restrictions add-on is installed, this parameter is ignored. |
booking_start_day |
1-7 |
0 |
Sets a restriction for the day of the week on which the booking can start. 0 = disabled, 1-7 = Monday-Sunday. If the Booking Restrictions add-on is installed, this parameter is ignored. |
booking_end_day |
1-7 |
0 |
Sets a restriction for the day of the week on which the booking can end. 0 = disabled, 1-7 = Monday-Sunday. If the Booking Restrictions add-on is installed, this parameter is ignored. |
show_date_selection |
yes/no |
no |
Show the start date and end date of the date selection made in the calendar at the beginning of the booking form. |