Home Features How It Works Pricing Integrations FAQ Contact
← Back to Integrations Integrations · WordPress

The official plugin — no code required.

Install it, drop in your company key, and place a shortcode wherever you want the widget or the full booking form.

// 01

Installation

  1. 1

    Upload the plugin — farebookings-book-now.zip — from Plugins → Add New → Upload Plugin, or copy it into wp-content/plugins/ over FTP.

  2. 2

    Activate it.

  3. 3

    Go to Settings → FareBookings and fill in:

    • Platform domainapp.farebookings.com, or the client's white-label subdomain if they have one
    • Company key — from the Frontend tab of your panel
    • Default language
    • Default dark mode — optional
    • Default short-form layout — Vertical (the usual widget) or Horizontal (a wide bar) — optional, new in v2.3
// 02

Shortcodes

Compact widget

[farebookings_widget]
lngLanguage for this widget specifically (falls back to the Settings default). e.g. [farebookings_widget lng="fr"]
darkDark (1) or light (0) mode. e.g. [farebookings_widget dark="1"]
opts_openStart with the Options panel already expanded (1) or collapsed as normal (0).
layoutinline for the wide horizontal bar instead of the vertical widget. New in v2.3. e.g. [farebookings_widget layout="inline"]. The shortcode always wins over the Settings default — to force vertical on one page while horizontal is the sitewide default, use [farebookings_widget layout=""].

Horizontal layout — things to know

  • Width: needs roughly 1000px of usable space. If the theme constrains content width (common on blog-style themes), place the shortcode in a full-width section or the bar ends up squeezed.
  • Mobile: stacks automatically below 900px — no separate shortcode needed for mobile.

Full booking form

[farebookings_book_now]

Accepts the same lng parameter if you want to force a language different from the Settings default.

Resizing is automatic

Both shortcodes handle the iframe-resize and data-forwarding behaviour described on the PHP and plain-HTML guides internally — nothing extra to add here. That only becomes something to think about if you skip the plugin and paste code by hand instead (below).

// 03

Campaign tracking — automatic

The plugin captures gclid (Google Ads), gbraid/wbraid, the standard utm_* parameters, and fbclid (Meta) on any page of the site, and forwards them to both shortcodes automatically — nothing to configure.

Why this matters

The widget and form live on a different domain from the client's own site. Without forwarding these parameters through, Google Ads and Meta lose the ability to attribute a booking back to the campaign that actually generated it.

// 04 · Only if you're not using the plugin

Pasting code manually instead?

Not recommended — the plugin above already handles everything below for you — but if a client pastes the raw widget/form code into WordPress rather than using the shortcodes, follow the PHP or plain HTML guide for the actual embed code, and watch for two WordPress-specific traps on top of that.

WordPress strips the <script> tag on save

Paste the code into a normal Paragraph block, or the Classic editor's Visual mode, and WordPress silently removes any <script> tags for security — only the <div>/<iframe> survives, with none of the JavaScript that makes it work.

Fix: use a Custom HTML block in Gutenberg, the Text tab in the Classic editor, or set the snippet to auto-insert into the header/footer instead of pasting it into the content editor at all.

Caching plugins can delay the script

Plugins like WP Rocket offer a "Delay JavaScript execution" option to speed up page load — it can break the order iframeResizer depends on.

Fix: exclude FareBookings' scripts from that delay in the caching plugin's settings — the iframeResizer filename, the app.farebookings.com domain, or the iframe's id all work as an exclusion pattern.

// 05

Updating the plugin

  1. 1

    Plugins → deactivate FareBookings → delete it.

  2. 2

    Upload the new zip → activate.

  3. 3

    Settings are kept — company key, server, language, dark mode all live in the fb_settings option, which deleting the plugin from the Plugins screen doesn't touch.

  4. 4

    Go to Settings → FareBookings and pick a layout, if the horizontal bar is wanted.

Checking which version is actually installed

Search the page source (Ctrl+U) for FB_PLUGIN_v2.3 — it appears on both the widget page and the Book Now page.

After updating, check:

  • Any page that already had the widget still looks exactly like it did before.
  • A page with layout="inline" shows the full-width bar, no gap underneath it.
  • With the bar: open Options → turn on Stops — the iframe grows to fit, no internal scrollbar, and the autocomplete dropdown doesn't get cut off.
  • A link with ?gclid=test123 to the widget page still carries the gclid through to the booking form — tracking itself hasn't changed, but it's the standard check.
// Common options
Dark modeShortcode attribute dark="1".
Options panel openShortcode attribute opts_open="1".
LanguageShortcode attribute lng="es", lng="fr", etc.
Horizontal barShortcode attribute layout="inline". Widget only, v2.3+.
// Checking it worked

Verifying tracking works

  1. Visit any page with ?gclid=test123 on the end of the URL.
  2. Submit the widget or form and confirm the booking carries that value through.

Building on a different platform?

There are dedicated guides for plain PHP sites and sites with no backend at all.