Skip to main content

How to embed a widget to WordPress CMS (PRO)

This article explains how to add your Bókun widgets to your WordPress page to start accepting online bookings.

 

How do I add a widget to my WordPress site?

Generating the embed code in Bókun

  1. Select Sales tools > Bookings widgets in the left-hand side menu
  2. Select the booking channel you'd like to add a widget to from the drop-down. A booking channel is an online sales channel that tracks where your online bookings are coming from. Usually, it will be your company's website. Learn more about booking channels.
  3. Select the widget type in the widget wizard on the left-hand side
  4. Select the product or product list you'd like to create a widget for
  5. Click on Generate embed code
  6. Click the Copy embed code button. This is the code you should use when embedding it into your website.

Embedding the code in WordPress

In WordPress, click Pages in the left-hand side banner. If you have already created a page, click it. If you haven't, click Start a page.

  1. Using the block system in the page, click the small + sign and then click Custom HTML.

  1. Paste the widget code in the box where it says Write HTML.

  1. Click Preview to check out how your widget will look.

Note that your widget might look different from the screenshot above if you're embedding a different type of widget, e.g. the product page or the product list.

 

Note If you are using Litespeed Web Cache you need to disable caching for the pages that are using Bókun widgets. In WordPress click Litespeed cache >> Cache >> Exclude >> Inside the field "Do Not Cache URIs" add the pages that have a Bókun widget.