Guide
Add online booking to a WordPress site
Put your Slate booking widget on a WordPress page with a Custom HTML block, or add a Buttons block that opens your booking page. Steps and fixes.
There are two ways to take bookings on a WordPress site. The booking widget sits on your page and grows to fit what the guest is doing. The Book now button opens your Slate booking page. Pick the widget if you can add scripts; the button works for everyone.
What you need
- Your code from Slate. In Slate, open the Booking page tab, go to Add to your website and choose WordPress. Slate shows your code with your details already filled in.
- For the widget: a WordPress user allowed to add scripts. WordPress calls this the unfiltered_html capability; administrators have it on most self-hosted sites.
- For the button: any WordPress user who can edit the page.
Add the booking widget
- Copy the code from Slate.
- Open the page in the block editor.
- Click the + to add a block and choose Custom HTML.
- Paste the code into the Custom HTML block.
- Click Update (or Publish) and view the page.
Or add a Book now button
- Copy your booking page address from Slate.
- Click the + to add a block and choose Buttons.
- Type Book now on the button, add a link, and paste your booking page address.
- Click Update (or Publish).
If it does not work
- The code disappeared when you saved. Your user cannot add scripts, or a security plugin removed them. Ask an administrator to add the block, or use the Buttons block.
- The page still shows the old version. A caching plugin may be serving a saved copy. Clear its cache and reload.
- The widget shows twice. The code is on the page twice, often once in a block and once in a theme or widget area. Keep one.
Check it worked
In Slate, paste the page’s address into Check my site. Slate reads the page, tells you whether it found your booking widget, and checks it again every day.
Sources
Questions
Why did my code disappear when I saved?
WordPress keeps scripts in a Custom HTML block only for users allowed to add them (the unfiltered_html capability). Everyone else's scripts are removed on save. Ask an administrator to add it, or use the Buttons block.
My site uses a page builder. Does this still work?
This guide covers the WordPress block editor. If you build your pages with a page builder, follow that builder's own instructions for adding an HTML or button element, and use your booking page address there.
Take bookings you can actually trust.
We move your calendar across with you, so nothing goes live until it matches what you already run.