Help Center
Sites & embed

Add ConvertNest to a WordPress website

Install the popup embed snippet on WordPress with WPCode, a Custom HTML block, the theme footer, or a page builder.

Open in app

Before you paste anything

Complete these steps in ConvertNest first so WordPress can load a live popup:

  • Add your WordPress hostname under Sites (for example yoursite.com or www.yoursite.com — match what visitors actually see)
  • Create and publish a popup (status Live) and assign that site in Funnel settings
  • Open the popup’s Embed panel and copy the script snippet (it uses data-popup with your public key)

Choose an install method

Pick the method that matches where the popup should appear:

  • Whole site (recommended) — a code snippets plugin such as WPCode. One paste, every public page.
  • One page or post only — a Custom HTML block in the block editor. Convenient, but some hosts strip script tags.
  • Theme files or the Site Editor — only if you already maintain a child theme or a block-theme footer.

Use a code snippets plugin (recommended)

Editing theme PHP files is risky: a theme update can erase your snippet. A plugin stores the ConvertNest script separately so it survives updates and loads on every public page. The snippet must run on the front end, not only in wp-admin.

  • In WordPress, go to Plugins → Add New, search for WPCode (free), then install and activate it. Insert Headers and Footers works the same way.
  • Open Code Snippets → Header & Footer.
  • Paste the ConvertNest embed snippet (the full script tag from Embed, including data-popup) into the Footer box. Footer maps to wp_footer and loads just before </body> — that is the preferred location. Use the Header box (wp_head) only if footer scripts will not run.
  • Click Save Changes.
  • If you use a cache plugin or CDN (WP Rocket, LiteSpeed, Cloudflare, host cache), purge it so visitors get the new script.

Use the Custom HTML block (block editor)

Use this when the popup should appear on a single page or post, not the whole site. Many themes and security plugins strip script tags from post content — if the popup never appears after publish, switch to WPCode instead of pasting the block on every page. In the default Gutenberg editor:

  • Open the page or post where you want the popup.
  • Click the + icon to add a new block.
  • Search for Custom HTML and select it.
  • Paste the ConvertNest embed snippet, including the opening and closing script tags.
  • Update or publish the page.

Classic themes: footer.php

If you prefer the theme file and you use a child theme, open Appearance → Theme File Editor (or edit via FTP/SFTP), open footer.php, and paste the ConvertNest script just before the closing </body> tag. Prefer a child theme so updates do not wipe the change. Avoid editing a parent theme you did not author.

Block themes and the Site Editor

On block (FSE) themes, open Appearance → Editor, edit the Footer template part, and add a Custom HTML block with the ConvertNest script. That places the snippet in the site footer, not on a single post. Some hosts strip script tags from Custom HTML — if the popup never loads, use WPCode instead.

Page builders (Elementor, Divi, and similar)

Use the builder’s sitewide header/footer or “custom code” / “integrations” settings and paste the same Embed snippet there. Do not rely on a single-page HTML widget unless you only need the popup on that page and the builder allows scripts.

Optional: open the popup from a WordPress button

Any button or link can open the popup without waiting for a trigger. Add data-cn-open with the same public key as the embed (shown in Embed next to your snippet). Example: <button type="button" data-cn-open="cn_popup_…">Get the free ebook</button>. The embed script must still be present on the page.

Confirm it works

Visit your live WordPress URL in a private window. The site under Sites should move from Pending to Active after the script loads once. If it stays Pending, check the hostname match (www vs non-www), popup Live status, caching, and that the script tag was not stripped by a security plugin.

Questions customers ask

Where do I find the WordPress embed code in ConvertNest?

Open your popup → Embed (after it is saved). Copy the script that includes /embed.js and data-popup="your public key". Publish to Live before expecting it to show on WordPress.

Should I put the script in the Header or the Footer?

Prefer Footer (wp_footer). That loads the embed just before </body> and matches how ConvertNest is meant to install. Use Header (wp_head) only if your plugin or theme will not run footer scripts.

Can I paste the script in a Gutenberg Custom HTML block?

Yes, for a single page or post. Open the editor, add a Custom HTML block, and paste the full snippet including the script tags. Many themes and security plugins strip those tags from post content — if the popup never loads, use WPCode sitewide instead.

Do I need a separate ConvertNest plugin for WordPress?

No. ConvertNest does not require a WordPress plugin. The standard embed script is enough on WordPress, Shopify, Webflow, and custom HTML sites.

Why is my WordPress site still Pending in ConvertNest?

Pending means the embed has not successfully loaded on that hostname yet. Confirm the Sites hostname matches the live URL, the popup is Live and assigned to that site, the script is in the footer/header, and caches or blockers are not removing it. Reload the homepage once after installing.

Can I show different popups on different WordPress pages?

Yes. Each popup has its own snippet. Install only the snippets you need on those pages, or install multiple snippets sitewide if several popups should be available with different triggers.