Skip to content

How to integrate the Booking Engine into your WordPress site with the CiaoBooking Widget plugin

ActivationVerified on 5 min read

Installation, configuration, and customization of the "CiaoBooking Widget" WordPress plugin, which integrates the Booking Engine booking module into your site by choosing between Native Widget and External Widget, via WordPress block or shortcode.

You are in the right place if…12 cases
  • “How do I put the booking form on my WordPress site?”
  • “Where do I download the booking widget plugin?”
  • “What is the booking widget shortcode for WordPress?”
  • “How do I change the color and font of the booking widget?”
  • “The widget always opens with today's and tomorrow's dates already filled in”
  • “What is the difference between a native widget and an external widget?”
  • “The native widget inherits the theme's graphics and the elements are misaligned”
  • “The numbers in the Adults and Children fields of the widget are not visible”
  • “I translated the site with WPML but the widget remains in Italian”
  • “If I put the booking engine address with the language (/en/) I get a 404 page”
  • “Can I set the shortcode to a single room by indicating the room ID?”
  • “Wordpress plugin for adding the widget to your website”

The "CiaoBooking Widget" plugin allows you to integrate a booking module directly into your WordPress site quickly and easily. This guide walks you through the installation, configuration, and customization of the widget.

If your site is not built with WordPress, you can still insert the search widget by following the dedicated guide for HTML insertion.

Native Widget vs. External Widget: which one to choose?

The plugin offers two different modes for displaying the booking module. Understanding the difference helps you choose the one best suited to your needs.

External Widget ([external_ciaobooking])

  • What it is: it is the original SmartPMS search widget, the same one you can generate from Settings > Booking Engine > Actions > Widget and paste into any site.
  • How it behaves: its appearance is isolated from the rest of the page, so the WordPress theme does not alter its design. Precisely for this reason, the site's CSS cannot modify its details: it can only be customized with the available parameters (colors, font, shadow, occupancy).
  • Language: it translates automatically based on the visitor's browser language.
  • Ideal for: those who want a ready-to-use widget that works without graphic interventions.

Native Widget ([native_ciaobooking])

  • What it is: a version written specifically for WordPress, with minimal graphic styles.
  • How it behaves: it inherits the styles of the WordPress theme. With some themes, this may alter its appearance (e.g., misaligned elements or hard-to-read text in fields): your webmaster can easily correct this with custom CSS.
  • Language: the texts are fixed strings, set via shortcode parameters or the Gutenberg editor. For a multilingual site, see the dedicated section below.
  • Ideal for: those who have a webmaster or developer who wants to adapt the widget to the site's design. Customization via CSS remains the responsibility of the webmaster.

Both widgets can be inserted either as traditional WordPress widgets or via shortcode.

Plugin Installation

You can install the plugin in one of two ways:

  1. Download and upload: upload the "ciaobooking-widget" folder to the /wp-content/plugins/ directory of your site.
  2. Install from WordPress: in the dashboard, go to Plugins > Add New and install the plugin by uploading the ZIP file directly, without extracting its content.

Once installed, go to the Plugins screen and click "Activate" next to CiaoBooking Widget.

How to insert the booking module

Method A: via WordPress Widgets

This method allows you to insert and customize the widget in real-time with any WordPress block editor, such as Elementor or the new default editor (Gutenberg).

  1. In the dashboard, go to Appearance > Widgets.
  2. Find the "CiaoBooking Native" or "CiaoBooking External" widgets in the list of available widgets.
  3. Drag the widget you prefer into one of your theme's areas (e.g., sidebar, footer).
  4. Configure the options directly from the widget panel.

Method B: via Shortcode

This method offers maximum flexibility, allowing you to insert the module into any page, post, or custom post type.

For the Native Widget: [native_ciaobooking]

For the External Widget: [external_ciaobooking]

Customization with shortcode parameters

You can customize the appearance and behavior of the module by adding parameters to the shortcode, in the format: [shortcode_name parameter1="value1" parameter2="value2"].

Parameters common to both widgets

  • property_id (mandatory): the ID of the property to connect. E.g., property_id="123"
  • host (mandatory): the domain of your Booking Engine. E.g., host="bookingengine.bookpage.io"
  • radius: rounding of the widget corners. E.g., radius="5px"
  • primary_color: primary color of the widget (e.g., buttons). E.g., primary_color="#FF5733"
  • font_family: font type to use. E.g., font_family="Arial"

Specific parameters for the Native Widget ([native_ciaobooking])

  • open_in_new_tab: opens the booking page in a new browser tab.
  • with_children: adds the field for selecting the number of children.
  • submit_button_text: customizes the text of the search/booking button.
  • start_date_label, end_date_label, guests_label, children_label: customize the labels above the fields (requires show_labels="true").
  • start_date_placeholder, end_date_placeholder, guests_placeholder, children_placeholder: customize the placeholder text in the fields.
  • enable_start_date_label, enable_end_date_label, enable_guests_label, enable_children_label: enable or disable the display of labels.
  • show_labels: mandatory if you use any of the labels listed above.

Specific parameters for the External Widget ([external_ciaobooking])

  • new_page: opens the booking module in a new page.
  • expanded_occupation: shows the occupancy options (adults/children) already expanded.
  • with_shadow: adds a shadow effect to the widget to give it depth.
  • alternative_submit: uses a submit button with an alternative style.
  • is_dropdown: uses dropdown menus for selections.
  • with_destinations: includes destination selection (useful for multiple properties).
  • booking_network_id: booking network ID, if applicable.

Multilingual site

Widget language

  • External Widget: you don't need to do anything, it adapts to the visitor's browser language.
  • Native Widget: labels, placeholders, and button text are fixed strings. To translate them, translate the WordPress page hosting the widget using your preferred translation plugin (e.g., WPML or Polylang): in the Italian version of the page, set the texts in Italian; in the translated version, set the texts in the respective language (via shortcode parameters or the Gutenberg editor).

Booking Engine language

The Booking Engine's default language is English and is accessible without a prefix (e.g., bookingengine.bookpage.io); other languages have a prefix: /it, /de, /fr. The address with /en does not exist and returns a page not found (404 error). When a visitor opens the address without a prefix, the Booking Engine detects their browser language, displays that version, and remembers it for subsequent visits: the Booking Engine language therefore depends on the visitor's browser, not on the language selected on your site.

Practical examples

Simple Native Widget

code
[native_ciaobooking property_id="123" host="bookingengine.bookpage.io"]

Fully customized Native Widget

code
[native_ciaobooking property_id="123" host="yoursite.ciaobooking.com" primary_color="#0066cc" with_children="true" open_in_new_tab="true" guests_label="Adults" children_label="Children" show_labels="true"]

Customized External Widget

code
[external_ciaobooking property_id="456" host="yoursite.ciaobooking.com" primary_color="#FF5733" font_family="Helvetica" new_page="true" with_shadow="true"]

Frequently asked questions

5
Is it possible to prevent the Arrival/Departure fields from being automatically pre-filled with today/tomorrow when opening the widget?

The widget is designed to be customized by your webmaster via CSS and JavaScript. Pre-filling with today's and tomorrow's dates is not a setting available in the SmartPMS panel: it is the default behavior of the widget when you press "Search" or "Book now" without having chosen a date.

It is technically possible to modify this behavior with custom JavaScript code on the site, but it is a discouraged modification because it is not officially supported: evaluate it with your developer, knowing that any future updates to the widget might require you to adapt it.

Are there other customization options besides "With border" to make it clearer that Arrival, Departure, and Guests are clickable elements?

Everything that is officially customizable is done via WordPress shortcodes (see the parameters listed in this guide) or, in real-time, via the native WordPress Gutenberg editor.

For more precise graphic interventions, you need to act via CSS on the site. Keep in mind that the widget applies its own styles with prefixed "cb-" classes, loaded after the site's CSS: your stylesheet must therefore be inserted after the widget's, increasing the specificity of the selectors if necessary (or using !important) on the elements identified with the browser's "Inspect element".

The External Widget ([external_ciaobooking]) is instead isolated from the rest of the page: for this reason, the site's CSS cannot modify it and it is customized only with the available parameters (colors, fonts, shadow, occupancy). If you need more precise graphic interventions, use the Native Widget ([native_ciaobooking]) and have your webmaster intervene via CSS.

My site is multilingual (WPML, Polylang): why does the widget remain in Italian or does the address with the language give a 404 error?

Booking Engine languages. English is the default language and is reachable without a prefix (e.g., propertyname.bookpage.io); other languages have a prefix: /it, /de, /fr. The address with /en does not exist, which is why it returns the 404 error. When a visitor opens the address without a prefix, the Booking Engine detects their browser's language, shows that version, and remembers it for subsequent visits: with an Italian browser, you will therefore always see the Booking Engine in Italian, even if you change the language on the site. The language depends on the visitor's browser, not on the one chosen on WordPress.

Widget language.

  • External Widget ([external_ciaobooking]): it translates itself based on the visitor's browser language; no configuration is needed.
  • Native Widget ([native_ciaobooking]): the texts are fixed strings. Translate the WordPress page containing the widget with your translation plugin and, in the translated version of the page, set labels, placeholders, and button text in the corresponding language (shortcode parameters or Gutenberg editor).
The native widget looks bad with my theme: misaligned fields, adult and child numbers not visible, I cannot change the button text color

The Native Widget has styles reduced to a minimum and inherits those of the WordPress theme: some themes alter its appearance, for example by offsetting alignments or applying a text color to the fields that is the same as the background. You have two possibilities:

  1. Correct via CSS: your webmaster can easily fix alignments, text colors, and button colors with custom CSS in the theme. This is an intervention at the webmaster's expense and is not covered by direct SmartPMS support.
  2. Switch to the External Widget ([external_ciaobooking]): its appearance is isolated from the theme, so it does not suffer from these alterations. It is customized only with the available parameters (colors, fonts, shadow, occupancy); if you insert it with the HTML code generated by SmartPMS, you also have the button text color (button-text-color) available.
Can I create a widget dedicated to a single room by indicating the room ID?

No. The Booking Engine allows filtering only by property (property_id parameter), not by room type. The widget can therefore lead the customer to a specific property, but all available types of that property will be shown in the results: it is not possible, for example, to show only Deluxe rooms. A room ID inserted in place of the property ID does not work.

Attachments