Summary: HolidayFox booking widget
HolidayFox booking widget is an embeddable availability and booking tool for UK accommodation providers (hotels, B&Bs, glamping, camping sites, holiday homes). You embed it on your own website so visitors can check real-time availability and book directly—no redirect to a third-party site. The widget is served from https://widget.holidayfox.com and can be added via an iframe on any site, or via WordPress shortcode [holidayfox_widget] and Gutenberg block if you use WordPress. You can customise layout (vertical or horizontal), colours, white-label mode (hide HolidayFox branding), and optionally show accommodation as image cards with prices. Each widget is tied to a HolidayFox destination (destination ID and slug from your partner dashboard).
- Embed methods: iframe (any website), WordPress shortcode, Gutenberg block.
- Widget URL:
https://widget.holidayfox.com/e/{destinationId}/{slug}plus optional query params (layout, whiteLabel, accCards, etc.). - Use cases: campsite booking widget, glamping availability, holiday let direct booking, B&B and hotel booking on your site.
New Features
?accCards=1Quick start
Paste this iframe into your page. Replace YOUR_DESTINATION_ID and your-destination-slug with your HolidayFox destination details.
<iframe src="https://widget.holidayfox.com/e/YOUR_DESTINATION_ID/your-destination-slug?layout=vertical" width="100%" height="480" frameborder="0" title="HolidayFox Booking Widget" ></iframe>
Live demo
Customise the options below and see the widget update in real time. Try selecting dates, guests, and accommodation—it’s fully functional.
Customise the demo
HolidayFox demo destination.Open current demo in a new tab →
Widget URL
The widget is loaded from https://widget.holidayfox.com. The path and query parameters determine the destination and behaviour.
Path (required)
/e/{destinationId}/{slug}
- destinationId — Your HolidayFox destination ID (e.g.
dest-Shy1y0fe5ZkE) - slug — URL-friendly destination name (e.g.
holidayfox-demo)
You can copy these from your HolidayFox dashboard or from an existing widget URL.
Example
https://widget.holidayfox.com/e/dest-Shy1y0fe5ZkE/holidayfox-demo
How to embed
1. Iframe (any website)
Add an <iframe> and set src to the widget URL. Optionally append query parameters (see Options below).
<iframe src="https://widget.holidayfox.com/e/YOUR_DESTINATION_ID/your-destination-slug?layout=vertical&whiteLabel=1" width="100%" height="480" frameborder="0" title="HolidayFox Booking Widget" ></iframe>
Adjust width and height to fit your layout. Use height="420"–600 for a typical sidebar or card; increase for a full-width block.
2. WordPress shortcode
If you use the HolidayFox Booking Widget WordPress plugin, you can embed the widget with a shortcode. destination and slug are required; the rest are optional.
[holidayfox_widget destination="YOUR_DESTINATION_ID" slug="your-destination-slug"]
With optional attributes:
[holidayfox_widget destination="YOUR_DESTINATION_ID" slug="your-destination-slug" acc_type="acctype-XXXX" layout="horizontal" height="480" width="100%" bo="1" responsive="true" class="my-booking-widget" id="hero-booking" ]
3. WordPress Gutenberg block
With the same plugin, add the HolidayFox Booking Widget block in the block editor. Configure Destination ID, Slug, optional Accommodation Type ID, and under Display/Advanced: Height, Width, Layout, Booking Override (bo), and Responsive. The block renders the iframe on the front end.
Widget options (query parameters)
Append these as query parameters to the widget URL (e.g. ?layout=horizontal&whiteLabel=1). When using the WordPress shortcode, the plugin maps shortcode attributes to these URL parameters for you.
| Parameter | Values | Description |
|---|---|---|
| accType | e.g. acctype-PgnTST2XAuGU | Pre-select a specific accommodation type. Omit to show the full list or a default. |
| layout | vertical (default), horizontal | Vertical stacks controls; horizontal arranges them in a row (useful for wider slots). |
| whiteLabel | 1 or true | Hides HolidayFox branding in the widget footer when set. |
| primaryColor | Hex, e.g. #3b82f6. In URLs use %23 for #. | Primary (buttons, links) colour. Default #3b82f6. |
| secondaryColor | Hex, e.g. #1e40af. Use %23 in URLs. | Secondary colour. Default #1e40af. |
| textColor | Hex, e.g. #1f2937. Use %23 in URLs. | Main text colour. Default #1f2937. |
| backgroundColor | Hex or leave empty for transparent. Use %23 in URLs. | Widget background. Empty = transparent so your page background shows through. |
| bo | 1 | Booking-override mode: changes copy (e.g. “Enter a booking”) and some behaviour for internal/partner use. Only enable if you use this workflow. |
| accCards | 1 / true | NEW: Display accommodation types as beautiful image cards with photos, prices, and availability status instead of a text dropdown. Cards show real-time availability, minimum stay requirements, and pricing at a glance. Perfect for showcasing your accommodations visually. When dates are selected, a helpful banner indicates filtered results with a "Clear dates" option. |
| adultsOnly | 1 / true | Restrict guest selection to adults only. |
| noInfants | 1 / true | Hide infants from the guest selector. |
| checkin | YYYY-MM-DD | Pre-fill check-in date. Use together with checkout. |
| checkout | YYYY-MM-DD | Pre-fill check-out date. Use together with checkin. |
| adults | integer (min 1) | Pre-fill number of adults. Minimum 1; lower values are clamped. |
| children | integer | Pre-fill number of children. Ignored if adultsOnly=1. |
| infants | integer | Pre-fill number of infants. Ignored if noInfants=1. |
| openCalendar | 1 / true | Open the calendar modal on load. |
| openGuests | 1 / true | Open the guests modal on load. |
| heading | string | Override the main heading (replaces “Check Availability” or “Enter a booking”). |
| hideHeading | 1 / true | Hide the main heading. |
| hideGuests | 1 / true | Hide the guests selector (guest counts are still used in the booking URL). |
Example: themed, white-label iframe
The HolidayFox Caravan theme uses a URL like this to match the site’s palette:
https://widget.holidayfox.com/e/DEST_ID/SLUG?layout=vertical&whiteLabel=1&primaryColor=%231f3327&secondaryColor=%23c7a35c&textColor=%231e1b16&backgroundColor=%23f6f3ee
Here %23 is the URL-encoded # for the hex colours.
Layout by use case
Pick a layout and height that fits where the widget sits on your page.
| Use case | Layout | Height | Notes |
|---|---|---|---|
| Hero / sticky sidebar | vertical | 420–480px | Compact; works in a card or narrow column. |
| Full-width booking block | horizontal | 480–600px | Wider; form and calendar side by side on desktop. |
| Dedicated booking section | vertical or horizontal | 600px+ | More room for calendar and copy; reduce scrolling. |
Iframe dimensions and behaviour
- Width — Use
100%for full container width, or a fixed value (e.g.800px). - Height — The widget needs enough vertical space. Common values:
420–480for a hero/sidebar card,600or more for a full booking section. The WordPress plugin default is600; the HolidayFox Caravan theme uses420in the hero and480in the booking section. - frameborder — Set to
0for a borderless embed. - title — Set to e.g. “HolidayFox Booking Widget” for accessibility.
- loading —
lazyis supported if you want to defer loading when the iframe is below the fold.
WordPress: shortcode, block, or direct iframe
Our HolidayFox Booking Widget plugin provides:
- Shortcode —
[holidayfox_widget ...]for use in any block or classic editor, or in theme templates viaecho do_shortcode('[holidayfox_widget ...]'); - Gutenberg block — “HolidayFox Booking Widget” in the block inserter; configure in the sidebar.
- Global settings — In HolidayFox → Settings you can set default height, width, layout, base URL, and responsive behaviour. These apply when the shortcode or block does not override them.
- Responsive — When
responsive="true"(plugin default), the plugin adds CSS so the iframe scales with the container on smaller screens.
PHP helper
The plugin exposes holidayfox_widget($destination, $slug, $args) for template code. Pass your destination ID and slug, plus an optional array (e.g. layout, height, acc_type).
<?php
echo holidayfox_widget('dest-Shy1y0fe5ZkE', 'holidayfox-demo', [
'layout' => 'vertical',
'height' => '480',
'whiteLabel' => '1',
]);
?>Direct iframe in templates
In our HolidayFox Caravan theme we embed the widget with a plain <iframe> in the template, passing destination->id and destination->slug from your theme options, plus layout, whiteLabel, and colour params to match the design. That approach works in any theme if you have the destination data available in PHP.
<iframe src="https://widget.holidayfox.com/e/<?php echo $destination->id; ?>/<?php echo $destination->slug; ?>?layout=vertical&whiteLabel=1&primaryColor=%231f3327&secondaryColor=%23c7a35c&textColor=%231e1b16&backgroundColor=%23f6f3ee" style="width:100%" height="420" class="holidayfox-widget" frameborder="0" title="HolidayFox Booking Widget"></iframe>
// $destination from theme options (e.g. $holidayfox_info->destination)
Troubleshooting
- The widget doesn’t load or shows a blank area
- Check that destination ID and slug are correct and match a live HolidayFox destination. Open the iframe
srcURL in a new tab; you should see the widget or a clear error. If your page is HTTPS, the widget loads fromhttps://widget.holidayfox.com; mixed HTTP/HTTPS can cause blocks in some browsers. - Colours (primaryColor, textColor, etc.) don’t change
- In the URL, hex values must be encoded: use
%23instead of#. For example#1f3327becomesprimaryColor=%231f3327. - Where do I get the destination ID and slug?
- From your HolidayFox partner dashboard once your destination is set up. You can also take them from an existing widget URL: the path
/e/dest-xxxx/slug-heregives youdest-xxxxandslug-here. Not yet a partner? Get in touch and we’ll provide them when your destination is created. - The iframe is too short on mobile
- Increase the
heightattribute, or use the WordPress plugin’s Responsive option. For a custom setup, give the iframe container a min-height or aspect-ratio in CSS so it has enough space on small screens. - Pre-selecting an accommodation type (accType) doesn’t work
accTypemust be the accommodation type ID (e.g.acctype-PgnTST2XAuGU), not the destination ID. Find it in your HolidayFox dashboard or in the URL when viewing a specific accommodation on the main HolidayFox site.
Need your destination ID and slug?
You can find these in your HolidayFox partner dashboard. If you’re not yet a partner, we can set you up with a destination and show you the exact widget URL and embed code.