Adding the booking form to a WordPress site

WordPress is the kindest of the website builders for this, and the only common one where everything works, wallets included. If you haven't read Putting the booking form on your own website yet, start there — it explains what the two pieces of code are and where to find your booking code. This page is the WordPress-shaped version of the same job.

The block editor

Edit the page, click + where you want the form to sit, and add a Custom HTML block. Paste the whole snippet into it — container and script together, in that order, in the one block.

<div id="nomnom-booking">
  <a href="https://book.nomnom-app.net/YOUR-CODE">Book a Table</a>
</div>

<script src="https://api.nomnom-app.net/web/embed.js"
        data-account="YOUR-CODE"
        data-target="nomnom-booking"></script>

Replace YOUR-CODE with your booking code in both places. The block's own preview shows almost nothing; update the page and look at the real thing.

The classic editor

Use the Text tab, never Visual. The visual editor rewrites what you paste and strips the script out. Paste it on the Text tab and update straight away — switching back to Visual afterwards can strip it even then.

Elementor, Divi and the rest

Elementor: the HTML widget. Not the Text Editor widget — that one escapes the script, and you'll find the code printed on your page as words. We have watched this happen on a real venue's site.

Divi: the Code module. Beaver Builder: HTML. WPBakery: Raw HTML. Whatever your builder calls its raw-code box, that's the one. Anything it describes as a text or rich-text box will mangle the snippet.

When it renders and then misbehaves

Speed and caching plugins are nearly always the cause, and they're worth ruling out before anybody starts looking at our end.

Optimisers — Autoptimize, WP Rocket, LiteSpeed Cache, W3 Total Cache — combine, defer and rewrite scripts as a matter of course. On one venue's site Autoptimize had rewritten the booking script into a base64 data URL with defer added to it. Every one of these plugins has an exclusion list. Add the NomNom script to it and retest before changing anything else.

Page caches are worse, because they mislead you. A cached copy keeps being served after you've fixed something, so you look at your own change and it isn't there. Put a nonsense query on the end of the address — yoursite.co.uk/book/?x=1 — and you'll get a freshly built page. WP Super Cache leaves a timestamped comment at the very bottom of the page source; if you're reading page source at all, read that line first.

Security plugins occasionally block the calls the form makes. If the form paints and then says it can't load, ask whoever is helping you for the browser console before anyone theorises — the error names the cause in one line, and guessing at it without has cost us days.

Apple Pay and Google Pay

This is where WordPress earns its keep. Most hosted website builders won't let you put a file at an address of your choosing, and without that Stripe can't verify your site and the wallets never appear. On WordPress you have the whole filing cabinet.

Download the file — it's the same one for everybody:

https://stripe.com/files/apple-pay/apple-developer-merchantid-domain-association

and put it on the site so it answers here, exactly, with no extension on the end:

https://yoursite.co.uk/.well-known/apple-developer-merchantid-domain-association

Two WordPress catches. Plenty of hosts hide folders that begin with a dot in their file manager, so you may need SFTP to see or create it. And a few security plugins block /.well-known/ outright. Open the address in a browser and check it actually answers before telling us it's up — then let us know and we'll switch your site on at our end. If your site answers on both yoursite.co.uk and www.yoursite.co.uk, say so, because those count as two separate addresses.

Prefer to hand the whole thing over?

None of the above is difficult exactly, but plugins update, themes drift, and a block that works today can start throwing errors after the next WordPress update. If you'd rather not be the one keeping an eye on that, we do this ourselves for a number of venues already: a full redesign, hosted by us, with your booking form built directly into the page from the start rather than pasted on afterwards — so none of what's above is anything you ever have to touch again.

There's no charge to build it. Keeping it is £15 a month, and that covers hosting and any change you ever want making — you message us what you'd like changed and we do it, no hourly rate and no quote for every little thing. For most venues that comes out below what the hosting, theme and plugin costs already add up to before a single change is even made.

No pressure either way, and it makes no difference to your booking account whichever you choose. If you'd like to see what we'd put together, just get in touch.