How to add a popup on WordPress

To add a popup on WordPress, install the free Popupsmart plugin and paste your Account Id into it, or paste Popupsmart's one-line embed code into your theme's footer.php. Popupsmart then builds, targets and publishes every popup from its own dashboard, so the popups don't live in your WordPress database.

WordPress has no popup block of its own, so a popup always comes from a plugin or a script.

Add a popup to WordPress
WordPress logoPopupsmart logo

Setup at a glance

Runs on
WordPress
Where the code goes
Popupsmart plugin, or footer.php before </body>
Add-on
Plugin optional

Before you start

You need admin access to WordPress and a Popupsmart account; a developer isn't on the list.

  • An administrator login to your WordPress dashboard, so you can install plugins or edit theme files.
  • A free Popupsmart account. The free plan covers one website and one live popup, so you can finish this guide without paying.
  • The address your visitors use for the site, which Popupsmart verifies after the install.

Popupsmart's own product data gives a sense of the time involved: among people who published a campaign in the 90 days to 16 September 2026, the median time from signup to the first published campaign was 32.5 minutes, and 287 of 332 published within a day. Those figures cover every platform, not WordPress alone.

How to add a popup on WordPress with the Popupsmart plugin

The Popupsmart plugin stores your Account Id and adds Popupsmart to every page of the site, so you never open a theme file. It is free on WordPress.org, with 600+ active installs. As of September 2026, its WordPress.org page also notes that it hasn't been tested with the latest three major WordPress releases; the embed-code method in the next section does the same job without a plugin.

Step 1: Add your website to Popupsmart

Sign in to your Popupsmart account, click your account at the bottom left and open Websites. Add your site's address.

Click Websites

Click the Unverified button next to the new website.

Click website unverified button

Step 2: Download the Popupsmart plugin

In the window that opens, choose the Wordpress tab and click Go to Wordpress App.

Embed code modal wordpress tab

On the plugin's WordPress.org page, click Download and save the popupsmart.zip file.

Popupsmart wordpress plugin page

Step 3: Install and activate the plugin

In your WordPress dashboard, go to Plugins and click Add New.

Wordpress panel add new plugin

Click Upload Plugin, choose the zip file and click Install Now. You can skip the download instead: search for "Popupsmart" on the same page and install it from the directory.

Wordpress panel upload plugin

When the install finishes, click Activate Plugin.

Wordpress panel active plugin

Step 4: Connect the plugin with your Account Id

Click Popupsmart in the WordPress menu, below Settings.

Wordpress panel click popupsmart

The plugin's page asks for an Account Id. Leave Version on v2.

Popupsmart wordpress plugin dashboard

In Popupsmart, click Account at the bottom left and open Personal Data.

Click personal data button

Copy your Account ID, paste it into the plugin's Account Id field and click Save Settings. It is the same number as the data-id in your embed code.

Personal data page account id

Back on Websites, refresh the page. If the site still shows as Unverified, click Unverified, then Verify website, and refresh the dashboard. The guide to verifying your website covers the other cases.

Step 5: Create and publish your popup

Click + New Campaign, choose your WordPress website and pick a template. Change its copy, colours and form fields, set who sees it and when, then move to the Publish step and click Publish.

publishing a popup campaign

Step 6: Check the popup on your site

Open your site in a private window and load a page the popup targets. It appears when its trigger fires.

How to add a popup in WordPress without a plugin

To add a popup in WordPress without a plugin, paste Popupsmart's embed code into your theme's footer.php once. The code loads Popupsmart on every page, and each campaign's rules decide where a popup shows. The blog's walkthrough of creating popups in WordPress without plugins shows the same method from the Websites page.

Two things to know first. WordPress warns that edits made in the Theme File Editor are lost when the theme updates, so put the code in a child theme if your theme gets updates. When I set this up with a customer on a classic theme, I put the code in the child theme's copy of footer.php, not the parent theme's, so the next theme update can't remove it. A block theme has no footer.php; there, use the plugin or add Popupsmart with Google Tag Manager.

Copy your embed code

Sign in to your Popupsmart account and click Embed Code in the left-hand menu.

embed code section in the popup builder

Click Copy to clipboard.

copying the embed code to clipboard

Open footer.php in the Theme File Editor

Go to your WordPress dashboard.

wordpress site dashboard screen

Click Appearance in the left sidebar.

appearance section in the wordpress dashboard

Click Theme File Editor, at the end of the list.

theme file editor in wordpress dashboard

Under Theme Files on the right, click footer.php.

footer file in the file editor

Paste the code and update the file

Paste the embed code after <?php wp_footer(); ?>, just before the closing </body> tag if the file has one, or at the end of the file if it doesn't. Click Update File.

pasting the embed code to the footer part

Add and verify your website

In Popupsmart, click the profile icon and choose Websites.

websites section in the popup builder

Click + New Website, enter your site's address and click Save. If it shows as Unverified, click Unverified, then Verify website, and refresh the dashboard. Then create and publish your popup as in Step 5.

add a new website button in the popup builder

Plugin or embed code? The plugin lives outside your theme, so a theme update or a new theme doesn't remove it. The embed code has nothing to update, but it goes when the theme's files are replaced. Use one method, not both: the help center warns that adding the code to the same site twice can make it malfunction.

Does WordPress have a built-in popup?

WordPress has no built-in popup. As of September 2026, WordPress.org's list of core blocks for WordPress 7.1 includes Accordion and Tabs blocks but no popup or modal block, so a popup comes from a plugin or a script.

The usual route is a popup plugin that builds and stores the popups inside WordPress. Here is one of them, Popup Maker, as its WordPress.org listing describes it in September 2026, next to Popupsmart:

A popup plugin (Popup Maker) Popupsmart
Where it runs Inside one WordPress site; popups are built and stored in WordPress WordPress and any other website: 3 websites on Basic, up to unlimited on Expert
How many popups As many as you like One live popup on the free plan, unlimited on paid plans
When it shows Free version: automatically with a delay, on a click, or after a form submission; exit intent and scroll need Popup Maker Pro Exit intent, scroll depth, time on page and inactivity on every plan, the free one included
Where it shows Posts, pages, post types, categories and tags URL rules, device, new or returning visitors, traffic source and location
Where the leads go Through a form plugin you pair it with, such as Contact Form 7, Gravity Forms or WPForms Mailchimp, Brevo, MailerLite or another of the 19 destinations the help center lists
A/B testing Not documented on the listing From the Advanced plan
Price Free core plugin; Popup Maker Pro is $99 a year Free plan; paid plans from $39 a month

On a single WordPress site, a free plugin like Popup Maker can be the cheapest start, and it keeps everything inside WordPress. Popupsmart earns its place when you'd rather not keep a popup plugin updated, want exit intent and scroll triggers without a paid add-on, or run sites that aren't on WordPress from the same account. The comparison of WordPress popup plugins covers the other plugins.

How do you show a popup on button click in WordPress?

A WordPress popup opens on a button click through Popupsmart's On-Click Targeting: the campaign gives you a line of code, and the button runs it when clicked.

  1. In the campaign's Segment step, click Edit Segment, choose Add user behavior targeting under User Behavior, add On-Click Targeting and tick Enable.
  2. Copy the code it shows. It looks like window.ps.show({ id: 12345 });, with your campaign's number.
  3. In the WordPress editor, add a Custom HTML block where the button should go and paste a button that runs the code, such as <button onclick="window.ps.show({ id: 12345 });">Get the guide</button>.

Use a <button> or a <div>, not a link. The help center's On-Click Targeting guide warns that a link, or a button that loads another page, leaves before the popup can show.

How do you show a popup only on some WordPress pages?

A WordPress popup shows on the pages its campaign targets, not the page you paste code into. The plugin or the embed code loads Popupsmart on every page, and each campaign's URL rule shows or hides it where the page address contains or matches a keyword, such as /blog/ or /pricing.

The trigger deserves the same attention as the page. In Popupsmart's 2026 benchmark, popups that wait before appearing convert 0.83% against 0.61% for popups shown the instant the page loads (median campaign), a lean rather than a proven gap, and exit intent shows no statistically reliable advantage. Try a scroll-depth or exit-intent trigger before you redesign a popup.

WordPress runs blogs, company sites and shops, so start from the job the page has:

Where do you put Mailchimp popup code in WordPress?

With Popupsmart, no Mailchimp code goes into WordPress at all. The popup runs from Popupsmart's own code, and its signups reach your Mailchimp audience through an API key you save once in the campaign's Integration section. Mailchimp's own pop-up form works differently: according to Mailchimp's help center, its code snippet goes between the <head> tags of your site, or can be added through Google Tag Manager. On a classic WordPress theme, the closing </head> tag is in header.php.

The Mailchimp popup guide covers the API key and field mapping. The help center lists 19 destinations, including Brevo and MailerLite, and a webhook, Zapier or Make covers a tool that isn't one of them.

Does a popup slow down a WordPress site?

A Popupsmart popup doesn't hold up your WordPress pages: the script loads asynchronously (async defer), so the browser finishes building the page before it fetches Popupsmart. The popups aren't stored in your WordPress database and aren't rendered by PHP; they load from Popupsmart.

When a WordPress popup doesn't appear, check the cache first, then the install, the website's verification and the trigger:

  • A cache is serving the old page. If you use a caching plugin or a CDN, clear its cache after installing.
  • The plugin isn't connected. Open Popupsmart in the WordPress menu and check that the Account Id matches the one on Popupsmart's Personal Data page, then click Save Settings.
  • The theme was updated or changed. Code pasted into footer.php goes with the old theme files. Paste it again, use a child theme, or switch to the plugin.
  • The code is installed twice. Keep the plugin or the footer.php code, not both.
  • The website isn't verified, or the address doesn't match. A campaign runs only on a verified website, and www.example.com and example.com are different sites to a browser. Add the address your visitors actually use.
  • The trigger hasn't fired yet. An exit-intent or scroll trigger waits for the visitor to leave or scroll; test in a private window and behave like a visitor.

Still stuck? Contact Popupsmart support with your site's address and the campaign name.

💬
From the support queue: What I check first when a WordPress popup doesn't show is the cache. A caching plugin or a CDN can keep serving the page as it was before Popupsmart was installed, so the code is in place but visitors never get it. Clear the cache and open the site in a private window; only then do I start checking the Account Id and the website's verification.

WordPress popup FAQ

What is the best popup plugin for WordPress?

The best popup plugin for WordPress depends on where you want the popups to live. A plugin such as Popup Maker builds and stores them inside WordPress. The Popupsmart plugin only connects the site; the popups run from Popupsmart, which also covers your sites that aren't on WordPress.

How can I add a popup to my website?

Paste Popupsmart's one-line embed code before the closing body tag of your site, or use the platform's app or plugin where one exists, then build and publish the popup in Popupsmart. On WordPress that means the Popupsmart plugin or footer.php; other platforms have their own guides.

The Popupsmart platform guides cover Shopify, Webflow, Wix, Squarespace and more.

Is there a free way to add a popup to WordPress?

Yes. Popupsmart's free plan is permanent, not a trial: one website, one live popup and 5,000 pageviews a month, with Popupsmart branding. The Popupsmart plugin is free too, so you can install it and run your first popup on a WordPress site without paying.

The Popupsmart pricing page compares it with the paid plans.

Can I add an exit-intent popup to WordPress?

Yes. Exit intent is one of Popupsmart's targeting options on every plan, the free one included: the popup appears when a visitor moves to leave the page, so you can make a last offer on any WordPress page.

Will the popup work with any WordPress theme?

Yes. The Popupsmart plugin adds the script through WordPress itself, so it doesn't depend on the theme. The footer.php method needs a classic theme; a block theme has no footer.php, so use the plugin or Google Tag Manager there.