# WordPress (/developers/platforms/wordpress)



You can take bookings on a WordPress site without sending customers away from it. This guide covers Book Now buttons that open booking on top of your page, and booking placed directly on a page. It uses the block editor and the free WPCode plugin, so it works with any theme.

<IntegrateNow host="wordpress" />

The wizard writes the code below with your own Location ID and booking page address already in it. If you would rather do it by hand, read on.

Before you start [#before-you-start]

* **An Administrator account.** Installing a plugin and saving scripts both need one. On a multisite network it has to be a Super Admin.
* **On WordPress.com, a paid plan** (Personal or higher), so you can install plugins. The Free plan removes scripts when you save.
* **Your Location ID.** In the Resytech dashboard, click your name in the top right and choose **Location Settings**. The ID is at the top of the page with a copy button.
* **Your booking page address.** In the dashboard, click your name in the top right, choose **Location Settings**, then open **Booking Domain**. The address has to show **Verified**. See [Booking Page Address](/docs/getting-started/booking-page-address).

<Callout type="warn" title="Test logged out, in a private window">
  Caching and speed plugins often treat logged-in users differently from visitors, and the editor only shows a preview. Open your site in a private or incognito window to test.
</Callout>

Book Now buttons [#book-now-buttons]

<Steps>
  <Step>
    Add the booking script to your site [#add-the-booking-script-to-your-site]

    WordPress has no built-in place for a script that loads on every page, so this uses a plugin. In your WordPress admin, open **Plugins**, then **Add Plugin** (older versions say **Add New**). Search for **WPCode**, click **Install Now**, then **Activate**. If you already have a plugin for header scripts, use that instead.

    Open **Code Snippets**, then **Header & Footer**. Paste this into the **Header** box, replacing `YOUR_LOCATION_ID` and the booking page address with your own. If there is already code in that box, add this underneath it. Then click **Save Changes**.

    ```html
    <script
      src="https://js.resytech.com/1/resytech.js"
      data-resytech-location-id="YOUR_LOCATION_ID"
      data-resytech-base-url="https://yourbusiness.bookingui.com"
      data-resytech-links="true"></script>
    ```

    This loads Resytech booking. The last line lets ordinary WordPress buttons and menu links open it.
  </Step>

  <Step>
    Point a button at a booking link [#point-a-button-at-a-booking-link]

    Add a **Buttons** block, or select a button you already have. Click the link icon in the toolbar, paste one of these as the address exactly as shown, starting with the slash, and press Enter:

    | Link                      | What it opens                                                                                    |
    | ------------------------- | ------------------------------------------------------------------------------------------------ |
    | `/#book`                  | The full booking flow, where customers choose an activity first                                  |
    | `/#book-YOUR_ACTIVITY_ID` | One activity. The ID is the last part of the address when you open the activity in the dashboard |
    | `/#gift-card`             | Gift card purchase                                                                               |

    Save or update the page. You can use a different link on each button.

    For a menu item, add a **Custom Link** with the same address: under **Appearance**, **Menus** on classic themes, or in the **Navigation** block on block themes.
  </Step>

  <Step>
    Test it [#test-it]

    Open your site in a private or incognito window and click the button. The booking window should open on top of the page.
  </Step>
</Steps>

Slide-in panel instead of a pop-up [#slide-in-panel-instead-of-a-pop-up]

To have booking slide in from the side of the page, add one line to the script tag:

```html
<script
  src="https://js.resytech.com/1/resytech.js"
  data-resytech-location-id="YOUR_LOCATION_ID"
  data-resytech-base-url="https://yourbusiness.bookingui.com"
  data-resytech-presentation="drawer"
  data-resytech-links="true"></script>
```

Booking on a page [#booking-on-a-page]

This places the booking calendar inside one of your pages, with no button to click.

<Steps>
  <Step>
    Add the booking script to your site [#add-the-booking-script-to-your-site-1]

    Open **Code Snippets**, then **Header & Footer**, and paste this into the **Header** box. If you already added the script tag for Book Now buttons, keep it and add only the last line underneath. Click **Save Changes**.

    ```html
    <script
      src="https://js.resytech.com/1/resytech.js"
      data-resytech-location-id="YOUR_LOCATION_ID"
      data-resytech-base-url="https://yourbusiness.bookingui.com"
      data-resytech-links="true"></script>
    <script>new ResytechApi().registerComponents();</script>
    ```
  </Step>

  <Step>
    Place the booking on a page [#place-the-booking-on-a-page]

    Open the page in the editor and click the &#x2A;*+** where the booking should appear. Choose **Custom HTML**, or type `/html` on an empty line. Paste this into the block. On WordPress 7, click **Edit HTML** first, paste into the **HTML** tab, then click **Update**. Save or update the page.

    ```html
    <resytech-booking-embed
      base-url="https://yourbusiness.bookingui.com"
      location-id="YOUR_LOCATION_ID">
    </resytech-booking-embed>
    ```

    To show one activity, add `activity-id="YOUR_ACTIVITY_ID"` to the tag. The booking area is 700 pixels tall unless you say otherwise. Add `height="900"` to change it.
  </Step>

  <Step>
    Test it [#test-it-1]

    Open the page in a private or incognito window. The booking calendar should appear where you placed the block. It looks blank in the editor, which shows only a preview.
  </Step>
</Steps>

A link to your booking page [#a-link-to-your-booking-page]

If you would rather not add any code, point a button at your booking page address, for example `https://yourbusiness.bookingui.com`. Add `/YOUR_ACTIVITY_ID` to go straight to one activity, or `/gift-cards` for gift cards. Customers book on your booking page instead of on your site. This works on every plan, including WordPress.com Free.

Troubleshooting [#troubleshooting]

<Accordions type="single">
  <Accordion title="Nothing happens when I click the button">
    Open the page in a private window and view the page source. If `resytech.js` is not in it, the Header box in **Code Snippets**, **Header & Footer** was not saved, or a caching plugin is still serving an old copy of the page. Clear the cache and try again. Then check the button link is exactly as shown.
  </Accordion>

  <Accordion title="It works for me but not for visitors, or only after a second click">
    A speed plugin is delaying or rewriting the script. Exclude `js.resytech.com` from JavaScript delay or deferral in the plugin settings. In WP Rocket that is **File Optimization**, **Delay JavaScript execution**, **Excluded JavaScript Files**. You can also add an attribute to the script tag: `nowprocket` for WP Rocket, `data-jetpack-boost="ignore"` for Jetpack Boost, or `data-cfasync="false"` for Cloudflare Rocket Loader, where it has to come before `src`.
  </Accordion>

  <Accordion title="My code disappears or shows as text after saving">
    WordPress removes scripts saved by anyone who is not an Administrator or Editor, and on multisite by anyone who is not a Super Admin. On WordPress.com the Free plan removes them for everyone. Ask an administrator to add the code, or use a link to your booking page, which needs no code.
  </Accordion>

  <Accordion title="The booking area looks blank in the editor">
    The editor shows Custom HTML in a preview that does not run the booking script. Look at the published page instead.
  </Accordion>

  <Accordion title="I use Elementor or another page builder">
    Use the builder's **HTML** widget in place of the Custom HTML block, and put the link in the builder's own link field for buttons. The WPCode step stays the same.
  </Accordion>

  <Accordion title="The booking window opens but stays blank or shows an error">
    The booking page address in the code has to match your address in the dashboard exactly, including `https://`. In the dashboard, click your name in the top right, choose **Location Settings**, open **Booking Domain** and check the address shows **Verified**.
  </Accordion>

  <Accordion title="I need to see what the script is doing">
    Add `data-resytech-debug="true"` to the script tag, reload the page and open the browser console. Remove it again once things work.
  </Accordion>
</Accordions>

How this guide was checked [#how-this-guide-was-checked]

The menu names were checked against the WordPress and WPCode help pages on 9 November 2026, for WordPress 7.1 and WPCode 2.4. We also followed the steps on a test site running WordPress 7.1.4 with WPCode: the Header box, a Button block link and a Custom HTML block all kept the code as pasted, and the pop-up and the booking on the page both opened for a logged-out visitor. We have not tested every speed plugin. If a plugin that delays JavaScript is active, the first click on a button can reach the page before the booking script has loaded. Excluding the script, as described above, avoids that.

Related [#related]

* [Add Booking to Your Website](/developers/integrate): the wizard that writes this code for you
* [Installation](/developers/installation): everything the script tag can do
* [Embed Booking UI](/developers/embed-booking-ui): more options for booking on a page
