Skip to main content

How to Add a Booking Widget to Your Website

Learn how to generate your property's widget code, embed it on your own website, and test that booking requests are working correctly, so guests can check availability and request bookings

Written by Dawn Ginie Santoyo

If you already have a website, you can add Hospitable’s booking functionality using widgets. This allows guests to view availability, see pricing, and submit booking requests directly from your site.

Use this article to get your property's booking widget code from Hospitable, embed it on your website, and test that guests can start booking requests directly from your site.

Plan requirement: Booking widgets are part of Direct Basic and Direct Premium Booking Plans, which require the Professional or Mogul subscription plan. Booking widgets are not available on Host or Essentials plans. If you are on Legacy subscription plan, you can get Direct as a paid add-on.


What You'll Need Before You Begin

Before you add a booking widget to your website, you'll need to make sure:

  • You have an existing website (e.g., WordPress, Squarespace, Wix, Shopify or custom-built)

  • Your website uses HTTPS — SSL/TLS (Secure Sockets Layer/Transport Layer Security) — for secure embedding

  • Your properties are eligible for Direct bookings

  • Your Direct setup is complete

  • Direct add-on is activated in Hospitable

  • A payout method is added to enable Direct bookings


How to Get Your Widget Code

Each property has its own booking widget, which you will need to add to your website. To get your widget code:

  1. Go to Direct Bookings > Website

  2. Select your site or create a new one

  3. Open the Properties section

  4. Find the property you want to embed

  5. Open the options menu (three dots)

  6. Click Copy widget code Before starting, ensure that only the relevant property is assigned to each site by unticking properties that do not belong to that site. This helps avoid confusion and ensures accurate widget generation.

This code is unique to that property.

The widget code is now copied to your clipboard and ready to paste into your website editor.

Property list in Direct Websites showing the three-dot options menu with Copy widget code highlighted

Property list in Direct Websites with a three-dot menu and Copy widget code option


How to Add the Widget to Your Website

To embed the widget, you'll need your property's widget code from Direct Bookings > Website. Follow these steps to add it to your website:

  1. Open your website editor

  2. Navigate to the page where you want the booking widget to appear

  3. Add an HTML embed block (or equivalent)

  4. Paste the widget code

  5. Save and publish your page

The widget will load on your page and allow guests to start the booking process.

Booking widget embedded on a website page showing a calendar, pricing, and booking button

Website page with a booking widget showing calendar, pricing, and booking button


How to Set Up a Widget for Each Property

Each property requires its own widget.

For best results:

  • Create a dedicated page for each property

  • Add the corresponding widget to each page

This ensures:

  • Accurate availability and pricing

  • Compatibility with features like property search and distribution

Each property must have its own widget and page to function correctly.


How to Add a Search Widget (Optional)

If you have multiple properties, you can also add a search widget. This widget enables guests to search across multiple properties, select dates, and specify guest count. Available properties are displayed at the top, while unavailable ones are shown below. Clicking on a property redirects guests to its booking widget with pre-filled dates.

This allows guests to:

  • Search across all properties

  • View availability based on dates and guest count

  • Navigate to individual property pages


Does My Website Platform Need Extra Setup?

Some website builders may require additional setup.

For example:

  • Wix may require developer mode or additional configuration

  • Other platforms may restrict embedded scripts — if your widget isn't displaying, check your platform's HTML embed settings or contact your web developer

Widget behavior may vary depending on your website platform. If you experience issues specific to your platform, contact your web developer or platform support.


How to Test Your Widget

Once you've embedded your property's widget code and published the page, test it using the following steps:

  1. Open your page in your browser's incognito window

  2. Select dates and check availability

  3. Start a booking request to confirm it works

A successful test completes when you can submit a booking request without errors. You'll receive a reservation notification (email and in-app) and the booking will appear in your Hospitable dashboard under Inbox, Calendar, or Reservations. This can be done on Self-hosted sites too, but the site URL should be validated


How to Troubleshoot Common Widget Issues

If your widget is not working, consider the following troubleshooting steps:

  • Ensure the widget code is pasted correctly into the HTML.

  • Verify that your website uses HTTPS.

  • Check for overlapping elements on the webpage and adjust the layout if necessary.

  • For self-hosted websites, ensure the property ID is included in the widget code to pass URL validation.

If the steps above don't resolve the issue, these are common causes:

  • The code may not be fully pasted

  • The property may not be eligible

  • The page may not support embedded scripts


FAQs

Will my Direct site's calendar stay in sync with my OTA (Online Travel Agency) calendars (Airbnb/Vrbo/Booking.com)?

Yes, your Direct site's calendar automatically stays in sync with your OTA calendars (Airbnb, Vrbo and Booking.com).

Hospitable runs a unified calendar — any reservation made on a connected channel (including Direct) instantly blocks the date everywhere else, and the Hospitable calendar is the single source of truth.

Can Hospitable Help with Embedding Widgets?

Hospitable provides guides and resources for embedding widgets, but the process is self-service. If you need additional help with troubleshooting embedding widgets in your website, you will need to contact your web developer or platform developer.

For the most common website builders, these guides explain exactly where to paste your widget code:

Which website builders, content management systems, and no-code platforms support the Hospitable booking widget?

Use this section to check whether your website platform can display the Hospitable booking widget, and to learn what to do if your platform isn't named here.

The Hospitable booking widget works on almost any platform that lets you add custom HTML to a page. The platforms below are grouped into three types: website builders, content management systems, and no-code and developer platforms. This list is not exhaustive — if your platform isn't shown, see "What if my website platform isn't listed here?" at the end of this section.

Some platforms restrict embeds to paid plans. On Squarespace, embedding code requires the Core plan or higher. On WordPress.com, embedding code requires a paid plan that includes plugin and hosting features. Check your platform's plan details before adding the Hospitable booking widget.

Website builders that support the Hospitable booking widget

The following hosted website builders let you add the Hospitable booking widget using a custom HTML, embed, or code element:

  • Wix

  • Squarespace (requires the Core plan or higher to embed code)

  • Weebly

  • GoDaddy (Websites + Marketing)

  • Google Sites

  • Duda

  • Jimdo

  • Strikingly

  • Webnode

  • SITE123

  • Yola

  • Ucraft

  • Webador

  • Hostinger Website Builder

  • IONOS

  • Bluehost

  • HostGator

  • Web.com

  • Network Solutions

  • Namecheap

  • One.com

  • Tilda

  • Simvoly

  • Nicepage

  • Mobirise

  • uCoz

  • 10Web

  • B12

  • Durable

  • Sitejet

Content management systems (CMS) that support the Hospitable booking widget

A content management system (CMS) is software for creating and managing website content. The following content management systems let you add the Hospitable booking widget using a custom HTML block, code module, or embed:

  • WordPress (self-hosted, WordPress.org)

  • WordPress.com (requires a paid plan that includes plugin and hosting features to embed code)

  • Drupal

  • Joomla

  • Ghost

  • TYPO3

  • Craft CMS

  • Concrete CMS

  • Umbraco

  • Statamic

  • ExpressionEngine

  • DNN (DotNetNuke)

  • MODX

  • HubSpot (CMS Hub / Content Hub)

  • Microsoft Power Pages

  • Adobe Experience Manager (AEM)

No-code and developer platforms that support the Hospitable booking widget

No-code platforms let you build websites without writing code, while developer platforms host sites you build yourself. The following platforms let you add the Hospitable booking widget using an embed element or by pasting the code into your page template:

  • Webflow

  • Framer

  • Bubble

  • Softr

  • Netlify

  • Vercel

  • Cloudflare Pages

  • GitHub Pages

  • Static-site generators (for example Astro, Next.js, Nuxt, Hugo, and Jekyll)

  • Headless content management systems (for example Contentful, Sanity, Storyblok, and Prismic)

What if my website platform isn't listed here?

If your website platform isn't named above, you can still add the Hospitable booking widget as long as your platform allows custom HTML. To add it:

  1. Open your website editor and go to the page where you want the Hospitable booking widget to appear.

  2. Add a custom-code element. Depending on the platform, this is usually called "Embed", "Embed code", "Custom HTML", "HTML block", "Code block", "Code injection", or "HTML/iFrame element".

  3. Paste your Hospitable booking widget code.

  4. Save and publish the page.

  5. Open the published page in an incognito or private browser window and test it by selecting dates and starting a booking request. Using a private window avoids cached results.

If you cannot find where to add custom code, search your platform's own help centre for "embed HTML" or "custom code", or contact your platform's support team.

Hospitable can help with the Hospitable booking widget code itself, but adding it to your specific website is managed on your platform.

Did this answer your question?