Jetpack 101

How to Add a Popup on WordPress: 3 Easy Ways & Best Plugins

email subscription popup on a laptop

With popups, you can increase email signups, promote special offers, or guide visitors toward a specific action. And WordPress gives you the flexibility to create popups through a variety of methods.

In this guide, you’ll find three straightforward ways to add popups to your WordPress site. You’ll also find a list of the best popup plugins and clear steps to follow no matter your technical experience level.

1. Use a WordPress popup plugin

One of the easiest and most efficient ways to add popups is with a dedicated plugin, many of which offer visual builders, triggers, advanced targeting, and analytics.

search results for "popups" in the WordPress plugin repository

The benefits of using a popup plugin

  • No coding required
  • Ready-to-use templates
  • Trigger and targeting options
  • Built-in integration with email services
  • A/B testing and conversion tracking 

Popular popup plugins for WordPress

Here are examples of plugins you can use to create and add popups to WordPress:

  • OptinMonster: Includes a visual builder, behavior-based targeting, and campaign types like lightbox, floating bar, and slide-ins
  • Popup Maker: Provides granular control over triggers, conditions, and integrations and works well for advanced use cases like ecommerce
  • TrustPulse: Leverages social proof through real-time popup notifications based on user behavior

How to install and set up a popup plugin

  1. Go to your WordPress dashboard
  2. Click Plugins → Add New
  3. Search for the popup plugin you want
  4. Click Install Now, then Activate
  5. Open the plugin settings
  6. Create your first popup using the plugin’s builder
  7. Set the display triggers and targeting conditions
  8. Preview and publish

Most plugins will allow you to choose display rules like:

  • Show after X seconds
  • Show on exit intent
  • Show on scroll percentage
  • Show only on specific pages or posts
  • Show only to new or returning visitors

Plugins are ideal for most users and require the least manual work. They also tend to stay compatible with updates to WordPress core and themes.

2. Embed third-party popup services

External popup tools are another option. These platforms often offer powerful editors, analytics dashboards, and audience segmentation. They’re great if you want to run popups across multiple platforms, not just WordPress.

How external popup builders work

Most third-party popup builders work by letting you:

  1. Build your popup inside their web-based editor
  2. Configure when and how it should appears
  3. Generate a JavaScript embed code
  4. Paste that code into your WordPress site

Popup services that integrate with WordPress

  • Popupsmart: Easy-to-use interface and targeting tools
  • Claspo: Templates, design flexibility, and detailed visitor rules
  • Hello Bar: Top bars, sliders, and modals
  • Sleeknote: A focus on mobile-optimized and ecommerce-friendly popups

How to add third-party popup code to WordPress

WPCode plugin page

Using plugins like WPCode is the best way to add third-party popup codes to your WordPress site, as it’s safer for beginners and won’t be overwritten when you update your theme. Here’s how you can do this: 

  1. Build your popup inside the third-party tool
  2. Copy the generated JavaScript embed code
  3. Install the WPCode plugin on your WordPress site
  4. In your WordPress dashboard, go to Code Snippets → Add Snippet
  5. Choose Add Custom Snippet → JavaScript Snippet
  6. Paste your popup code and configure any option settings that you’d like
  7. Click Save Snippet to publish your popup
Newsletter

Write once, reach all

Transform your blog posts into newsletters to easily reach your subscribers.

Start for free

3. Manually code a popup

If you want full control or prefer to keep things lightweight, you can code your own popup directly. This method is best for developers or advanced users comfortable with adding and editing WordPress code.

What you need

  • HTML for the popup structure
  • CSS for styling and animation
  • JavaScript or jQuery for open/close behavior

A basic example

HTML

<div id="custom-popup" class="popup-hidden">

  <div class="popup-content">

    <p>This is your popup message.</p>

    <button id="close-popup">Close</button>

  </div>

</div>

CSS

.popup-hidden { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }

.popup-content { background: white; margin: 100px auto; padding: 20px; width: 300px; }

JavaScript

document.addEventListener('DOMContentLoaded', function () {

  setTimeout(function () {

    document.getElementById('custom-popup').style.display = 'block';

  }, 3000);

  document.getElementById('close-popup').onclick = function () {

    document.getElementById('custom-popup').style.display = 'none';

  };

});

Adding the code

You can place this code in your theme’s footer or by creating a custom plugin. Make sure to enqueue any JavaScript or CSS properly.

When to choose manual coding

  • You have coding skills
  • You want to avoid plugin bloat
  • You need a unique or lightweight popup
  • You only want to show a popup on one specific page

This approach is not ideal for non-technical users or for those who want easy A/B testing or targeting options.

Make your popup strategy work

Poorly timed or aggressive popups can hurt the user experience, while smart popups can increase engagement and lead to conversions.

Best practices for popup usage

  • Use exit intent to avoid interrupting visitors’ experience
  • Set frequency limits so people don’t see the same popup repeatedly
  • Offer value in the popup (a discount, content upgrade, early access, etc.)
  • Optimize for mobile by keeping it short and responsive
    Always test performance and user interaction

Match popup goals to popup types

  • Email signup: Use center modals or slide-ins with a form
  • Announcement or offer: Use top bars or lightboxes
  • Survey or feedback: Use bottom corner slide-ins
  • Urgency: Add countdown timers and time-sensitive language

The tool you choose will determine how far you can go with targeting and personalization. If your needs are simple, use a plugin. If you want custom control, go the manual route. If you want to scale across platforms, use an external builder.

Bring your popup strategy full circle with Jetpack Newsletter

Once you’ve added a well-timed popup to your site, the next step is making sure the emails you collect are used effectively. A popup’s job is to attract attention and collect addresses. But the long-term value comes from what happens after someone subscribes.

That’s where Jetpack Newsletter can help.

Jetpack Newsletter is built for WordPress users who want to send updates, offers, or content directly from their site to their subscribers. It connects seamlessly to your WordPress posts and pages, allowing you to create and send email newsletters without leaving your dashboard.

When paired with a popup that encourages signups, Jetpack Newsletter becomes part of a complete lead generation system:

  • A popup captures attention and invites visitors to subscribe
  • Jetpack Newsletter manages those subscribers and sends them updates automatically or on your schedule
  • Your content reaches more people directly, increasing repeat visits and engagement

Because it’s integrated with your WordPress site, Jetpack Newsletter lets you focus more on creating and less on setting up complicated email tools. It also gives your visitors a familiar and simple way to subscribe, at the moment they’re most interested.

If you’re serious about growing your audience, combining a well-crafted popup with Jetpack Newsletter is a simple and reliable way to start. It’s a strategy that keeps working behind the scenes, even as your site grows.

This entry was posted in WordPress Tutorials. Bookmark the permalink.
WordPress Tutorials

Jen Swisher profile

Jen Swisher

Jen is a Customer Experience Specialist for Jetpack. She has been working with WordPress and Jetpack for over a decade. Before starting at Automattic, Jen helped small businesses, local non-profits, and Fortune 50 companies create engaging web experiences for their customers. She is passionate about teaching others how to create on the web without fear.

Newsletter

Write once, reach all

Transform your blog posts into newsletters to easily reach your subscribers.

Start for free

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum