If you’re using Wix for your website, you can add Hospitable’s booking functionality using widgets. This allows guests to check availability and submit booking requests directly from your Wix site.
However, Wix has some limitations that require additional setup compared to other platforms.
How Wix Integration Works
Wix does not support standard script embeds in the same way as other platforms. Because of this:
Widgets must be added using an HTML embed (iframe)
Additional configuration may be required for booking actions to work correctly
Wix requires extra setup for booking widgets to function properly.
Before You Start
Make sure:
You have a Wix site with editing access
Your properties are eligible for Direct bookings
You have your widget code from Hospitable
Also see: How to Add a Booking Widget to Your Website
Add the Booking Widget in Wix
Step 1: Enable Dev Mode (Velo)
Open your Wix site editor
Enable Dev Mode (Velo) from the top toolbar
This allows you to add custom code required for the widget to function.
Step 2: Add an HTML Embed
Add an HTML iframe element to your page
Paste your widget embed code into the HTML component
This will display the booking widget on your page.
Step 3: Add Redirect Handling Code
To allow booking actions (like “Request to book”) to work correctly, you need to add a script.
In your masterPage.js, add:
import wixLocation from 'wix-location';
$w.onReady(function () {
$w("#html1").onMessage((event) => {
wixLocation.to(event.data.hospitable_widget_redirect);
});
});
This ensures guests are redirected correctly when interacting with the widget.
Set Up One Page Per Property
For best results:
Create a dedicated page for each property
Add the corresponding widget to each page
This ensures:
Correct booking flow
Compatibility with search and distribution features
Each property must have its own page and widget for proper functionality.
Known Limitations with Wix
Wix embeds widgets inside iframes, which can limit functionality
Some features (like multi-property search) may not be supported
Additional code is required for full functionality
Some widget features may not work as expected on Wix due to platform restrictions.
Test Your Setup
After adding the widget:
Open your site in a browser
Select dates and interact with the widget
Click “Request to book” to confirm redirects work
Use an incognito window to avoid caching issues.
Troubleshooting
If your widget is not working correctly:
Confirm Dev Mode is enabled
Check that the embed code is complete
Verify the redirect script is added correctly
Ensure your property is eligible
Also see: Troubleshooting Widget Issues
Important Things to Know
Wix requires additional setup compared to other platforms
Widgets must be embedded using HTML components
Redirect handling code is required for booking actions
Each property should have its own page and widget
Some features may be limited due to Wix restrictions




