How to add an availability calendar to a WordPress website
Show guests which nights are free on your WordPress site, with the block editor, a page builder or a sidebar widget. Covers WordPress.com plan limits and when a booking plugin is the better choice.
7 min read · Updated
Short answer
Copy the calendar's embed code from your booking tool, add a Custom HTML block where the calendar should appear, paste the code and update the page. You need to be an Administrator or Editor for WordPress to keep the code. On WordPress.com, code like this only works on plans that include plugins; on other plans, link to the calendar with a button instead.
Two ways to get a calendar on WordPress
| Where your bookings live | Good for | |
|---|---|---|
| A booking plugin installed in WordPress | In your WordPress database | Sites where WordPress is the main tool, and someone keeps the plugin and WordPress updated |
| An embedded calendar from an outside booking tool | In the booking tool; WordPress only shows the calendar | Places that also take phone, e-mail and Booking.com bookings and want one list for all of them |
Both are fine. A plugin keeps everything inside WordPress, and there are free and paid ones in the plugin directory (WP Simple Booking Calendar is a common one). It also means one more plugin to update, back up and move if you ever change your website. An embedded calendar is a few lines of code: your bookings stay in the booking tool, and if you rebuild the website, you paste the same code into the new one.
The rest of this guide is about the second way.
Before you start: get the embed code
Every availability-calendar tool gives you a short piece of code to paste. It's usually a <script> line, sometimes an <iframe> or a plain link. Copy it exactly as given.
In :
Website calendar in the menu → open a calendar → Put it on your website → Script → copy. The help page on the website calendar has the details.
Add it with the block editor
This is the default editor in WordPress since version 5.0.
- Open the page in the editor, for example a new page called "Availability".
- Click where the calendar should go, then add a Custom HTML block: click the + (Block Inserter) and search for "html", or type
/htmlin an empty line and press Enter. - Paste the whole embed code into the block. In newer WordPress versions you click Edit HTML first and paste the code in the window that opens. Keep it as one piece, with the
<script>line in the same place as the rest. - Click Update (or Publish for a new page) and open the page to check it.
The calendar fits the width of your content column and sets its own height, so there's nothing to size. If you want it wider than your text, set the block's alignment to wide or full width, if your theme offers it.
Your user role matters
WordPress keeps <script> and <iframe> code only for users allowed to post unfiltered HTML. On a normal site those are Administrators and Editors; on a multisite network, only Super Admins. For any other role, WordPress quietly removes the code when the page is saved, and the block shows only the plain link.
Add it with a page builder or the classic editor
- Elementor: drag an HTML widget onto the page and paste the code into it.
- Divi: add a Code module and paste the code.
- Beaver Builder: add an HTML module and paste the code.
- Classic editor: switch the editor from Visual to Text and paste the code where the calendar should go. Don't switch back to Visual before saving, since the visual editor can rewrite code.
- A sidebar or footer: in
Appearance→Widgets, add a Custom HTML widget. A sidebar is narrow, though: a small "Check availability" button usually works better there than a whole calendar.
WordPress.com: check your plan first
WordPress.com (the hosted service) is stricter than self-hosted WordPress. It allows <script> and <iframe> code only on plans that include plugins, with hosting features turned on. On the other plans, the code is removed when you save, even if it looks right in the editor. Their page about adding code to WordPress.com lists what each plan allows.
On a plan without code, use a link instead: add a Buttons block, write "Check availability", and paste the calendar's link (in , the
Link tab under Put it on your website). Guests then open the calendar on its own page.
When the calendar doesn't show
- Only a link shows where the calendar should be. The
<script>line was removed: by your user role, by your WordPress.com plan, or by a security plugin. Paste the code again as an Administrator, or use the button and link. - The calendar appears only after a tap or a scroll. A speed or caching plugin is probably delaying scripts until the visitor interacts with the page. Add the calendar's script address to the plugin's list of scripts not to delay. In
, that address contains
embed.js. - The code shows as text on the page. It went into a normal paragraph instead of a Custom HTML block. Delete it and paste it into a Custom HTML block.
Checklist
- The code is in a Custom HTML block (or your page builder's HTML element), pasted whole.
- You saved it as an Administrator or Editor, or on a WordPress.com plan that allows code.
- On the live page, tap an arrival and a departure day, and send yourself a test request.
- Book a test night in your booking tool and check that it shows as taken a few minutes later.
- Check the page on a phone.
- If you're also on Booking.com or Airbnb, connect their calendars too, or the website will show nights as free that are already sold there. See syncing Booking.com and Airbnb with your website's calendar.
Questions
Do I need a plugin to embed a calendar?
No. The Custom HTML block is part of WordPress itself. A plugin only helps if you can't paste code (some WordPress.com plans) or want a shortcut to the same code.
Will the calendar slow down my site?
It loads in its own frame, separately from the rest of the page, so your own text and images aren't held up by it. Putting it on its own "Availability" page keeps your home page as light as it was.
Does it follow my site's language?
With 's script, yes: the calendar reads the language your WordPress page says it's in. That works with translation plugins that set the page language, such as WPML or Polylang. One code serves every language version.
Can guests book and pay through it?
Not with : guests send a request and you confirm it. That's on purpose, for places that want to choose their guests. If you need instant booking and payment, a booking plugin or a booking engine is the better fit.
What happens if I change my WordPress theme?
Nothing: the calendar is part of the page's content, not the theme. Check the page once after switching themes, since the new theme may have a narrower content column.
Try it on your own website
shows free nights on your own website, lets guests send a request you approve, and syncs dates with Booking.com and Airbnb. €10 per property a month, the first 3 months free, no card needed.