Shortcode – Booking Form with calendar

Note! Please be careful in configuration of Booking Calendar shortcode with quote symbols. Do not use non standard opening or closing quot symbols. Only standard like: ' The best way to type them from keyboard, and not copy/paste.

Booking Form

[booking resource_id=1 nummonths=2]
Parameters
resource_id
ID of the booking resource. You can check the ID of the each booking resources at the Booking > Resources page. If this parameter is skipped, default value = 1.
In version 9.7.7 or older name of this parameter - type instead of resource_id

Example #1:

[booking resource_id=1]

Example #2 (booking resource (calendar) with ID = 5):

[booking resource_id=5]

Booking Calendar version 9.7.7 or older have different name for this parameter - type.
Example #3 for update 9.7.7 or older:

[booking type=5]

Available in Paid versions

nummonths
number of the visible months in the calendar.
If "nummonths" is skipped the calendar is show 1 visible month.

Example:

[booking resource_id=1 nummonths=3]

Example of showing 6 months via 3 columns and 2 rows with 100% calendar width and date cell heights 50px:

[booking resource_id=1 nummonths=6 options='{calendar months_num_in_row=3 width=100% cell_height=50px}']

startmonth
start month in the calendar after loading of the calendar with booking form. Format of value for this parameter is 'YYYY-MM'. If "startmonth" is skipped the calendar is start showing months from current month.

Example:

[booking resource_id=1 startmonth='2025-3']

form_type
name of the custom booking form. You can create the custom booking forms at the Booking > Settings > Form page. If this parameter is skipped, default value is 'standard'.

Example #1 (custom form name "my-custom-form-name" defined at the Booking > Settings > Booking Form page):

[booking resource_id=1 form_type='my-custom-form-name']

Example #2:

[booking resource_id=1 form_type='another_form_name']

Available in Business Medium / Large versions

aggregate
show dates as booked in current calendar, if such dates booked in one of the calendars (booking resources) with ID, which defined in this "aggregate" parameter.It is means that calendar can aggregate dates from several booking resource. Usage: aggregate='2;4;5', where 2;4;5 – ID of booking resources. The ID of booking resources you can check at the Booking > Resources page.

Please note, by default Booking Calendar aggregate the bookings and unavailable dates defined at the Booking > Availability > Days Availability page. You can aggregate only 'bookings' without including unavailable dates from the 'Booking > Availability > Days Availability' page. If you use the 'aggregate' parameter in the Booking Calendar shortcode and wish to include only bookings, utilize the new parameter: options="{aggregate type=bookings_only}". For instance, in the shortcode example below, we aggregate only bookings:

[booking resource_id=3 aggregate='3;4' options="{aggregate type=bookings_only}"]

This feature do not work for booking resources with specific capacity in Booking Calendar Business Large version. Available in Paid versions.

possibility to set calendar additional parameters: full calendar width (percentage or pixels), date cell height, number of months in one row and in Business Medium and higher versions the minimum or fixed number of days selection for the specific day of week or specific season.

Specify the full calendar width (one or several months in a row), the height of date cell (so its possible to configure the height of entire calendar by that (just divide the entire calendar width to 7 and you will get approximate date cell height), the number of months in one row (its useful, if you want to show several months in several rows, for example 4 months in 2 rows or 6 months in 2 rows etc).

Configuration rules
Example 1:

[booking resource_id=1 nummonths=2 options='{calendar months_num_in_row=2 width=568px cell_height=30px}']

Example 2:

[booking resource_id=1 nummonths=4 options='{calendar months_num_in_row=2 width=100% cell_height=40px}']

The general structure of the configuration calendar parameter is following:

{calendar months_num_in_row="{NUMBER OF MONTHs IN ONE ROW}" 
width="{ENTIRE WIDTH OF CALENDAR IN px or %}" 
cell_height="HEIGHT of CALENDAR DATE CELL, only in px"}

Parameters:
calendar - name of the parameter. Its always the same (Its required for the future extend functionality).
months_num_in_row - number of months on one row. Its can be any number.

width - the entire width of the calendar. This width can be in "px" (for example: "400px") or in percentage (for example "100%). In CSS "300px" defined as: "width: 100%; max-width:300px;". In situation, if you need to use exact calendar width, instead of "width=300px" use "strong_width=300px"

strong_width - the exact width of the calendar. Use this parameter instead of "width" parameter. This width can be in "px" for (example: "400px") or in percentage (for example "100%). In CSS "300px" defined as: "width: 300px;" Parameter available since update 9.4.

cell_height - height of calendar date cell. The height can be only in "px" (example "30px").

Available in Business Medium / Large, MultiUser versions

Specify that during certain seasons (or days of week), the specific minimum number of days must be booked, for example: visitor can select only 3 days starting at Friday and Saturday, 4 days - Friday, 5 days - Monday, 7 days - Saturday, etc...
Important! Please note, this feature is working only, if you activated the "Range days" selection at the General Booking Settings page.

Configuration rules
Example 1:

[booking resource_id=1 options='{select-day condition="season" for="High season" value="7-14,20"},
{select-day condition="season" for="Low season" value="2-5"}']

Example 2:

[booking resource_id=1 options='{select-day condition="weekday" for="1" value="4"},
{select-day condition="weekday" for="5" value="3"},
{select-day condition="weekday" for="6" value="2,7"}']

The general structure of the configuration one condition rule are following:

{select-day condition="{season|weekday}" 
for="{Name of season filter|Number of week day}" 
value="Number of days selection"}, ...

Parameters:
select-day - name of the rule. Its always the same (Its required for the future extend functionality).
condition - type of the condition. There are 2 types of the condition: "weekday" and "season". "weekday" - is mean that condition rule is based on the selected day of week value, like Monday, Tuesday, etc... . "season" - is mean that condition rule is based on the "season filter" name of selected date. In other words the condition is TRUE if the selected day is belong to some season filter in the Booking > Resources > Filters page.
for - value of the specific conditions. If the condition is true, so then the number of specific days selection will possible in the calendar. If the condition is set as "weekday" so then "for" can have the following numbers: 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday.
value - number of specific days selection in the calendar, which can be selected by visitors. It can be simple number or several days separated by comma (example: "7,14,21,28") or by dash (example:"3-5", its the same like this: "3,4,5") or combination (example:"3-5,7,14", its the same like this: "3,4,5,7,14")

Available in Business Medium / Large, MultiUser versions

[booking resource_id=1 form_type='standard' nummonths=2 
options='{select-day condition="weekday" for="1" value="4"},
{select-day condition="weekday" for="5" value="3"},
{select-day condition="weekday" for="6" value="2,7"}']

where values of the "for" parameter are mean following:
0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday
You can use only one number of the specific week day.

Its mean that on Monday is possible to select only 4 days,
on Friday is possible to select only 3 days,
on Saturday is possible to select only 2 or 7 days.

Available in Business Medium / Large, MultiUser versions

[booking resource_id=1 form_type='standard' nummonths=2 
options='{select-day condition="season" for="High season" value="7-14,20"},
{select-day condition="season" for="Low season" value="2-5"}']

where values of the "for" parameter are mean following:
High season - its a name of the some Season filter on the Booking > Resources > Filters page,
Low season - its a name of the some Season filter on the Booking > Resources > Filters page
You can use only single season filter name in the one value.

Its mean that during High season is possible to select only 7, 8, 9, 10, 11, 12, 13, 14 or 20 days
and during the Low season is possible to select only 2, 3, 4 or 5 days

Available in Business Medium / Large, MultiUser versions

Description.
This configuration will allow to set the specific start day(s) selection (day(s) of week) for the specific Season Filters.

Note. All these conditions are based on the "first" day of range days selection in the calendar.

For example, in high season, you can allow start day selection only at Friday in the Low season (or any other days) to start day selection from any weekday.
1) I can suggest that you are activated the range days selection using 2 mouse clicks for the specific day(s) of week. For example for Friday.
2) So then inside of the page, where you are inserted the booking shortcode, you are need to have something like this, to allow any start day selection for the "Low season" days:

[booking resource_id=1 form_type='standard' nummonths=6 
options='{start-day condition="season" for="Low season" value="0,1,2,3,4,5,6"}']

Configuration of the Options parameter:
start-day – name of the rule. Its always the same.
condition – type of the condition. For this rule is available only 1 type of the condition: “season”.
season – is mean that condition rule is based on the EXACT “season filter” name of selected date. In other words the condition is TRUE if the selected day is belong to some season filter in the Booking > Resources > Filters page.
for – value of the specific condition – EXACT Name of Season Filter.
value – day(s) of week, where we can start selection for the specific season.
It can be simple number or several days separated by comma.
0 – Sunday, 1 – Monday, 2 – Tuesday, 3 – Wednesday, 4 – Thursday, 5 – Friday, 6 – Saturday

Available in Business Medium / Large, MultiUser versions

You can use the condition for defining a specific number of selected dates if started from a specific date. Condition format:

{select-day condition="date" for="2023-10-01" value="20,25,30-35"}

.

Example of shortcode:

[booking resource_id=3 options='{select-day condition="date" for="2023-10-01" value="20,25,30-35"}']

Available in Business Medium / Large, MultiUser versions

In update 6.1 or newer you can use new condition variable: options='{parameter name="my_param" value="value"}'
This option parameter can transfer custom value from this booking form shortcode into the content of booking form.

Example of shortcode usage:

[booking resource_id=1 form_type='standard' nummonths=3 
options='{parameter name="my_param" value="value"},{parameter name="other_param" value="other value"}']

Example of booking form customization:

[text some_field_name "my_param"]

and

[text other_field_name "other_param"]

Important. Parameter name must be unique and exist only once in booking form.


Adding booking form into page via Classic Editor
Adding booking form into page with via WordPress Blocks - Gutenberg editor
(Available since update 8.4)