Add bookings to WordPress
Add a Custom HTML block where bookings should appear and paste your daybag script tag into it. Your booking flow renders in the page, or as a floating Book now button. WordPress keeps script tags only for users allowed to post unfiltered HTML, such as administrators, and WordPress.com needs a plan with plugins.
Steps
- 1
Copy your tag
In daybag, open Dashboard → Developers → Widget, pick Inline or Button, and copy the tag. Your slug is already in it.
- 2
Add a Custom HTML block
Edit the page, click the + block inserter and add a Custom HTML block, or type /html.
- 3
Paste the tag
Paste the tag into the block's HTML and save the page.
- 4
Check the live page
Open the page as a visitor and make sure the booking flow shows.
Your tag
Replace your-slug with your booking page's slug, or copy the tag from Dashboard → Developers → Widget with it filled in.
<script src="https://daybag.io/widget.js" data-org="your-slug" async></script><script src="https://daybag.io/widget.js" data-org="your-slug" data-mode="button" async></script>Inline or button
- Inline, the default, renders the booking flow right where you paste the tag.
- Button:
data-mode="button"floats a Book now pill in the corner that opens the flow. For the button on every page, put the button version in a Custom HTML block in your footer: the Footer template part in the Site Editor, or a footer widget area in a classic theme. - Link: your booking page,
https://daybag.io/book/your-slug, is the same flow on a page of its own.
Test it
- Open the published page in a private window, as a guest would.
- Book a test with your own email: the confirmation lands in your inbox.
- Find the booking in Dashboard → Bookings and cancel it there.
FAQ
Why did my tag disappear?
WordPress strips script tags for users without the unfiltered_html capability, such as Contributors, and for everyone but Super Admins on multisite. Ask an administrator to add it.
Does it work on WordPress.com?
On plans with plugins and hosting features turned on. Other plans strip script tags; link a button to your booking page instead.
Can the widget open one offering?
Yes. Add data-offering with the offering's id: the end of its booking link in your dashboard, after ?offering=.
What if my builder won't run the tag?
Link a button to your booking page, https://daybag.io/book/your-slug. It's the same booking flow on a page of its own.