Booking Window: Open the Calendar from Any Button
The booking window opens the calendar over your page when a visitor clicks something. It can be a button, an image, a menu item or a link in text. The visitor does not leave the page. The window closes with the cross, the Escape key or a click outside it. It is available in every build of the plugin, free or paid.
The window is not an iframe. The calendar is drawn into the page itself, the first time it is needed, and kept there. Opening it again for another service switches the calendar without loading it anew.
Open it from a link
In any link field, for example the link of a button in Elementor, Gutenberg or Divi, or a custom link in a menu, type one of these:
#bbc-bookopens the calendar for all services.#bbc-book-12opens one service, by its id. A slug works too:#bbc-book-studio-a.?booking=openopens all services.?booking=open&service=12opens one. This form also works from an advert or a link in an e-mail. Add&theme=weekioto choose the look.
If JavaScript is off, the link opens the calendar as a plain page, so it never leads nowhere.
Open it with a CSS class or an attribute
Most builders have a field for CSS classes, and some for custom attributes. Use them when a link field is not available.
- Class
bbc-open: all services. - Class
bbc-book-12: service 12 (the numeric id only). - Classes
bbc-pos-left,bbc-pos-right,bbc-pos-center: where the window opens. - Attribute
data-bbc-book: empty for all services, or a service id or slug. - Attribute
data-bbc-service="12": one service. - Attribute
data-bbc-theme="weekio": the look of the window, the key of a theme. - Attribute
data-bbc-position="left": where the window opens.
A service value may hold letters, digits, underscore and hyphen. Anything else is read as all services. If several are set, data-bbc-service wins over data-bbc-book, then the class bbc-book-12, then the link.
Where the window opens
There are three placements: center (default, a dialog), left and right (a panel that slides in from that side). An unknown value falls back to the centre. Inside the window the two columns of the Weekio theme scroll on their own, and the loader stays in the middle while the calendar loads.
Examples
<a href="#bbc-book-12" class="bbc-pos-right">Book the studio</a>
<button data-bbc-book="12" data-bbc-theme="weekio">Book</button>Elementor
- Add a Button, or any widget with a link.
- In Link type
#bbc-bookor#bbc-book-12. - Optional: in Advanced, CSS Classes, type
bbc-pos-right. - Update the page.
Gutenberg
- Add a Buttons block and type
#bbc-bookin the link box. - Optional: in Advanced, Additional CSS class(es), type
bbc-pos-left. - Update the page.
Menu
Under Appearance, Menus, add a Custom Link with the URL #bbc-book or /?booking=open&service=12.
JavaScript
A script on your page can open and close the window:
window.bbcBook.open('12', 'weekio', 'right'); // service (id or slug, empty for all), theme (empty for the site's), position (empty for the default)
window.bbcBook.close();For developers
baza_bc_triggers_position: the default placement when a trigger names none (center,leftorright).baza_bc_triggers_allow_origin: an origin, for examplehttps://other.example, that may load the calendar from another site. Empty means this site only.
For a ready button, see the article about the shortcodes Book now and .







Default placement and close button
With the Weekio theme, the default placement is also a setting: Booking window position in the block Calendar view of the Design settings. The attribute, the class, the filter and the JavaScript call described above override it.
By default the close button sits on the corner of the window. To put it beside the window instead, add data-bbc-close="outside" to the trigger, return 'outside' from the filter baza_bc_triggers_close_style, or pass 'outside' as the fourth argument of the JavaScript call:
window.bbcBook.open('12', 'weekio', 'right', 'outside');