How to add online booking to your WordPress site

Add a “Book now” button that opens your booking page on top of your site, or show the whole booking page inside one of your pages. It takes about five minutes.

Updated · by Loudwren

Your own code, with your web address already filled in, is in your Roost admin under Settings → Links. Copy it from there rather than typing it.

Option 1: a “Book now” button

The button opens booking in a panel over your page, so customers never leave your site.

  1. In WordPress, open the page where you want the button (for example your home or contact page) and click Edit.
  2. Click the + to add a block, search for Custom HTML and add it.
  3. Paste your button code:
    <a href="https://roost.loudwren.co.uk/your-business/book" data-roost-book>Book now</a>
    <script src="https://roost.loudwren.co.uk/your-business/embed/book.js" defer></script>
  4. Click Preview to check the button works, then Update (or Publish).

The button picks up your theme’s link style. To make it look like your other buttons, ask whoever looks after your theme to give links with data-roost-book your button style, or add data-roost-style="button" to the link for a ready-made one.

Option 2: the booking page inside a page

Good for a dedicated “Book” page. Add a Custom HTML block in the same way and paste:

<iframe src="https://roost.loudwren.co.uk/your-business/book?embed=1" title="Book online"
  style="width:100%;min-height:760px;border:0" loading="lazy"></iframe>

Using the classic editor?

Switch the editor to the Text tab (not Visual) before pasting, or the code will show as text.

If nothing appears

Some hosted plans, including some WordPress.com plans, remove code like this. If the button or page doesn’t show up, use a normal Button block and link it to your booking page, https://roost.loudwren.co.uk/your-business/book. It does the same job; customers just go to the booking page instead of seeing it on top of yours.