With the Shortcode

Documentation Menu

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

ParameterValuesDefaultDescription
idthe ID of the calendarnoneThis will let the shortcode know which calendar to embed. You can find your calendar IDs in WP Booking System → Calendars
form_idthe ID of the form0This 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.
titleyes/noyesDisplays the calendar title as a heading above the calendar
legendyes/noyesDisplays the calendar’s legend items
legend_positionside/top/bottomsideThe position of the calendar legend. Can be to the side of the calendar, above the calendar or below the calendar.
displayany positive integer1The number of calendar months to be displayed
year0 or 1970-21000The starting year of the calendar. 0 (zero) means the current year will be displayed.
month0-120The starting month of the calendar. 0 (zero) means the current month will be displayed.
show_first_available_dateyes/nonoJump to the month with first available bookable date.
languageauto or 2 letter language codeautoThe language in which to display the calendar and form. With auto the plugin tries to detect your website’s language automatically.
start1-71The starting day of the week. 1 to 7 = Monday to Sunday
dropdownyes/noyesDisplay the month navigation dropdown in the first calendar
jumpyes/nonoMakes the arrow navigation change all the visible months instead of just one at a time. Used in combination with the display parameter.
history1,2,31Handles the past dates in the calendar.

  • 1 – show all booking history
  • 2 – replace history with the default legend item
  • 3 – grey out past dates
tooltip1,2,31Handles the tooltips in the calendar

  • 1 – disable tooltips
  • 2 – enable tooltips
  • 3 – enable tooltips and show a red indicator for dates containing a tooltip
highlighttodayyes/nonoHighlight today’s date in the calendar
weeknumbersyes/nonoShow the week numbers in the calendar
show_pricesyes/nonoShow the daily price for each day. Only works if pricing is enabled.
form_positionside/bottombottomThe position of the booking form
auto_pendingyes/noyesHandles 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_typesingle/multiplemultipleHandles 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_stylenormal/splitsplitHandles 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_daysany positive integer0Sets a restriction for the minimum days that must be booked. If the Booking Restrictions add-on is installed, this parameter is ignored.
maximum_daysany positive integer0Sets a restriction for the maximum days that must be booked. If the Booking Restrictions add-on is installed, this parameter is ignored.
booking_start_day1-70Sets 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_day1-70Sets 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_selectionyes/nonoShow the start date and end date of the date selection made in the calendar at the beginning of the booking form.

Was this article helpful?

Yes (44) No

We're sorry to see this article wasn't as helpful as we hoped it would be. Please let us know what you were looking for so that we can improve this documentation page.

Full CTA BG
Is WP Booking System a good fit for you?

Tell us about your business activity & plugin requirements and we'll let you know if WP Booking System is right for you.

Have a support question? Please use this form instead.