EarlyTrap

  • Features
  • How it works
  • Pricing
  • About

How to add a waitlist form to WordPress

The block editor's Custom HTML block accepts a script tag, so you can add an EarlyTrap form to any page or post without installing a plugin.

Step 1: Get your embed code

  1. Sign in to EarlyTrap and click Create Project. Enter a name and your site's address in the Website URL (Origin) field: the domain only, with no page path, starting with https://www. (for example https://www.yoursite.com). The form only saves emails when the page that shows it is served from that address.
  2. Open the project, choose Widget in the sidebar and click Add New Form.
  3. Click Config on the new form. Change the placeholder, button text or colors if you like.
  4. Click the copy button next to Copy script to embed.

You get a snippet like this. The three IDs are unique to your form; the ones below are placeholders.

<div id="next-subscribe-form-normal"></div>
<script
  src="https://www.earlytrap.com/widget.js"
  data-project-id="YOUR_PROJECT_ID"
  data-widget-id="YOUR_WIDGET_ID"
  data-uid="YOUR_UID"
  async
></script>

Step 2: Add it to WordPress

  1. Open the page or post in the block editor.
  2. Click the Block Inserter icon and add a Custom HTML block. You can also type /html in a new paragraph and press Enter.
  3. Click Edit HTML, paste your whole EarlyTrap snippet and press Update.
  4. Update or publish the page, then open it as a visitor to check the form.

Saving a <script> needs the unfiltered_html capability. For users without it, such as Contributors, WordPress strips tags like <script> and <iframe> when the post is saved.

Official docs: WordPress documentation: Custom HTML block.

If the form does not appear

  • Paste both parts of the snippet: the <div> is where the form appears and the <script> loads it.
  • Replace the placeholders with the real IDs from Config. If one is missing, the browser console shows "EarlyTrap: missing required data attributes".
  • Keep to one EarlyTrap form per page.

If the form appears but signups are not saved

The form shows on any site, but it only saves emails when the page is served from the Website URL (Origin) of your project: same protocol and same domain, including the www. prefix. Check that the project's URL is your site's address without a page path. To confirm that signups are saved, submit a test email and look for it under Emails & Broadcasts in your project.

After you publish

Every signup appears under Emails & Broadcasts in your EarlyTrap project, where you can also send a broadcast to your list. Changes you make in Config apply to a form that is already embedded, so you do not need to paste the snippet again.

FAQ

Why does my snippet disappear after I save?

Your role probably lacks the unfiltered_html capability, so WordPress removes the script when saving. Ask a site administrator to add the block or to change your role.

Can I add it to a post instead of a page?

Yes. The Custom HTML block is available anywhere you use the block editor, posts included. Keep to one EarlyTrap form per page or post.

More guides

  • Waitlist widget for your website
  • How to create a waitlist for your product launch
  • Add a waitlist form to Webflow
  • Add a waitlist form to Squarespace
  • Add a waitlist form to Next.js

Ready to start collecting emails on your site?

EarlyTrap

Subscribe for updates

Powered by EarlyTrap

Product

  • Features
  • How It Works
  • Pricing
  • About

Guides

  • Waitlist widget
  • How to create a waitlist
  • Waitlist on Webflow
  • Waitlist on WordPress
  • Waitlist on Squarespace
  • Waitlist on Next.js

Español

  • Widget de lista de espera
  • Cómo crear una lista de espera

© 2026 EarlyTrap

Building tools for creators