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

🖼️
Accommodation Cards View: Display your accommodations as beautiful image cards with photos, prices, and real-time availability. Perfect for showcasing your offerings visually. Enable with ?accCards=1
📅
Smart Date Filtering: When dates are selected, the widget automatically shows only available accommodations with a clear indicator banner. Users can easily clear dates to see all options.
🛡️
Enhanced Reliability: Comprehensive error handling and defensive programming ensure the widget works smoothly even with unexpected data or edge cases.

Quick 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>

Try the widget (live demo) →

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

Layout
Primary
Secondary
Text colour
Background

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

Open this URL in a new tab →

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.

ParameterValuesDescription
accTypee.g. acctype-PgnTST2XAuGUPre-select a specific accommodation type. Omit to show the full list or a default.
layoutvertical (default), horizontalVertical stacks controls; horizontal arranges them in a row (useful for wider slots).
whiteLabel1 or trueHides HolidayFox branding in the widget footer when set.
primaryColorHex, e.g. #3b82f6. In URLs use %23 for #.Primary (buttons, links) colour. Default #3b82f6.
secondaryColorHex, e.g. #1e40af. Use %23 in URLs.Secondary colour. Default #1e40af.
textColorHex, e.g. #1f2937. Use %23 in URLs.Main text colour. Default #1f2937.
backgroundColorHex or leave empty for transparent. Use %23 in URLs.Widget background. Empty = transparent so your page background shows through.
bo1Booking-override mode: changes copy (e.g. “Enter a booking”) and some behaviour for internal/partner use. Only enable if you use this workflow.
accCards1 / trueNEW: 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.
adultsOnly1 / trueRestrict guest selection to adults only.
noInfants1 / trueHide infants from the guest selector.
checkinYYYY-MM-DDPre-fill check-in date. Use together with checkout.
checkoutYYYY-MM-DDPre-fill check-out date. Use together with checkin.
adultsinteger (min 1)Pre-fill number of adults. Minimum 1; lower values are clamped.
childrenintegerPre-fill number of children. Ignored if adultsOnly=1.
infantsintegerPre-fill number of infants. Ignored if noInfants=1.
openCalendar1 / trueOpen the calendar modal on load.
openGuests1 / trueOpen the guests modal on load.
headingstringOverride the main heading (replaces “Check Availability” or “Enter a booking”).
hideHeading1 / trueHide the main heading.
hideGuests1 / trueHide 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 caseLayoutHeightNotes
Hero / sticky sidebarvertical420–480pxCompact; works in a card or narrow column.
Full-width booking blockhorizontal480–600pxWider; form and calendar side by side on desktop.
Dedicated booking sectionvertical or horizontal600px+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: 420480 for a hero/sidebar card, 600 or more for a full booking section. The WordPress plugin default is 600; the HolidayFox Caravan theme uses 420 in the hero and 480 in the booking section.
  • frameborder — Set to 0 for a borderless embed.
  • title — Set to e.g. “HolidayFox Booking Widget” for accessibility.
  • loadinglazy is 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 via echo 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 src URL in a new tab; you should see the widget or a clear error. If your page is HTTPS, the widget loads from https://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 %23 instead of #. For example #1f3327 becomes primaryColor=%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-here gives you dest-xxxx and slug-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 height attribute, 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
accType must 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.