If you’re building a WordPress website, especially on WordPress.com, you may have already run into this problem: you can’t install plugins unless you’re on the Business plan or higher. That limitation makes it tough to add important features like popups for announcements, promotions, or email signups.
But here’s the good news: you can still create a popup in WordPress without a plugin, using just a bit of code. Whether you’re looking to keep your site lightweight, avoid plugin bloat, or work within the limits of a free or Personal WordPress.com plan, this guide will walk you through exactly how to do it.
We’ll show you multiple ways to create a popup manually, customize it for different use cases, and avoid common pitfalls, all without sacrificing speed, security, or design.
Quick Answer: To create a popup in WordPress without a plugin, you can manually add HTML, CSS, and JavaScript to your theme or block editor. This approach is especially useful on WordPress.com plans that don’t support plugins.
Table of Contents:
- Why Avoid Plugins for WordPress Popups?
- Method 1: Creating a Popup Using HTML, CSS, and JavaScript
- Method 2: Add a Popup Using the Block Editor
- Customization Tips: Make Your Popup Feel Native
- Real Use Cases: When a Manual Popup Makes Sense
- Common Issues to Avoid
- Final Thoughts
- FAQ
Why Avoid Plugins for WordPress Popups?
There are a few strong reasons to skip popup plugins entirely:
1. WordPress.com Restrictions
If you’re on WordPress.com’s Free, Personal, or Premium plans, you simply can’t install plugins. Manual popup code is your only option unless you upgrade.
2. Faster Page Loads
Popup plugins often load extra scripts and CSS, which slow down your website, especially on mobile. Manual code means fewer external dependencies.
3. Tighter Security
Every plugin is another piece of software with potential vulnerabilities. By minimizing your use of third-party tools, you reduce your risk profile.
4. More Control
With manual code, you have full control over styling, behavior, and placement. No clunky plugin interfaces or bloated dashboards.
Another overlooked issue with popup plugins is their tendency to conflict with theme or builder frameworks. A plugin might render beautifully in one layout, then completely break responsiveness in another. These compatibility issues become more common as plugins try to offer “drag and drop” functionality without considering every user’s design stack. By writing your own popup code, you create exactly what you need, nothing more, nothing less.
Additionally, plugin-based popups often come with branding, locked features, or require account signups to external services. If your goal is a clean, distraction-free user experience or you’re building something for clients, the manual approach not only gives you full ownership, it also helps you build deeper technical fluency with WordPress itself.
Method 1: Creating a Popup Using HTML, CSS, and JavaScript
This method works on both WordPress.org and WordPress.com. If you have access to a Custom HTML block, Additional CSS, or the Theme Editor, you’re good to go.
Step 1: Add HTML to Your Page or Footer
<div id="popup" class="popup-overlay">
<div class="popup-content">
<span class="close-button" onclick="closePopup()">×</span>
<h2>Special Announcement</h2>
<p>Subscribe to our newsletter and get 10% off your first purchase.</p>
</div>
</div>
Step 2: Add CSS (Customize > Additional CSS or Site Editor)
.popup-overlay {
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0,0,0,0.5);
display: none;
justify-content: center;
align-items: center;
z-index: 9999;
}
.popup-content {
background: #fff;
padding: 30px;
border-radius: 8px;
max-width: 500px;
text-align: center;
}
.close-button {
position: absolute;
top: 10px;
right: 15px;
font-size: 24px;
cursor: pointer;
}
Step 3: Add JavaScript (Footer, Code Block, or Customizer)
<script>
window.onload = function() {
setTimeout(function() {
document.getElementById("popup").style.display = "flex";
}, 2000);
};
function closePopup() {
document.getElementById("popup").style.display = "none";
}
</script>
Result
This popup appears 2 seconds after the page loads. Users can close it with the X. All without installing a plugin.
Common Challenges and Fixes
- Popup not showing at all? Double-check that your
<script>tag is placed at the end of your content or footer area. If JavaScript loads before the HTML element is rendered, it may not find the#popupID. - Close button doesn’t work? Make sure the
onclick="closePopup()"attribute is correctly set on the span and that theclosePopup()function exists in your script. - Styling doesn’t apply? Ensure your CSS is properly saved in the Additional CSS panel or stylesheet. Avoid extra curly braces or missing semicolons.
- Popup covers entire page but doesn’t center? This is often a
flexissue—verifydisplay: flexand thejustify-contentandalign-itemsrules. - Other elements not clickable after popup shows? Check your z-index values and make sure you’re hiding the overlay when the popup closes. This popup appears 2 seconds after the page loads. Users can close it with the X. All without installing a plugin.
Method 2: Add a Popup Using the Block Editor
If you’re using WordPress.com’s block editor or Gutenberg on WordPress.org, you can insert popup code directly into a page or post.
Step-by-Step:
- Add a Custom HTML Block
- Paste the same HTML as shown above
- Use the Site Customizer > Additional CSS to paste the popup CSS
- Add the JavaScript in a Code block at the bottom of the page (or use the HTML block)
This method is great for one-time popups on landing pages or lead magnets.
Common Challenges and Fixes
- Popup overlaps or breaks page layout? This is likely a CSS conflict. Try wrapping your HTML/CSS in a unique class name to avoid clashing with your theme styles.
- JavaScript doesn’t run? If added in a code block, make sure it’s inside
<script>tags. Also confirm that JavaScript is allowed on your WordPress.com plan. - Popup works in preview but not live? This could be a caching issue—clear your site cache or try in an incognito window.
- Editing blocks removes your code? Sometimes the block editor strips tags—use a Custom HTML block, not a Paragraph or Shortcode block.
- Popup appears but can’t be closed? Make sure the
onclickfunction is included and there are no typos in your function call or element ID.

Customization Tips: Make Your Popup Feel Native
A popup doesn’t have to feel like a clunky overlay or an interruption. When done right, it can feel like a seamless part of your site’s design, helpful, intentional, and unobtrusive. Here’s how to elevate your manual popup implementation to feel as polished as a high-end feature.
✅ Add Animation
Use transform or opacity animations for smoother popup appearance. Subtle fade-ins or slide-ins from the bottom or center help reduce the “popup shock” that can turn visitors away. You can apply @keyframes CSS animations or use simple transition properties for a refined touch.
✅ Adjust Delay or Trigger
Change the timer in setTimeout or trigger on scroll, button click, or exit intent. For example, use scroll-based visibility if your offer is related to blog content, or exit intent if you’re capturing leads. These tweaks keep your popup relevant and timely.
✅ Collect Emails
Embed a basic email form or link out to a Mailchimp or WordPress.com Form block. Make sure your input fields are mobile-friendly, and always include a strong call-to-action that matches the context of the popup.
✅ Affiliate Promos
Promote your own product or affiliate offers subtly. For example, you can link to your affiliate landing page from within the popup. Just make sure your offer aligns with the page content to avoid appearing intrusive or unrelated.
✅ Match Your Theme Styling
Use fonts, colors, and buttons that match your existing website design. The more visually integrated your popup is, the more likely it is to be accepted by visitors. Consider pulling styles from your theme’s stylesheet or duplicating buttons and layout patterns already in use elsewhere on the site.
✅ Add Accessibility Features
Ensure that keyboard users can close the popup using the Esc key, and that the content is readable by screen readers. Including proper ARIA labels and focus trapping will help make your popup experience inclusive to all users.
✅ Add Animation
Use transform or opacity animations for smoother popup appearance.
✅ Adjust Delay or Trigger
Change the timer in setTimeout or trigger on scroll, button click, or exit intent.
✅ Collect Emails
Embed a basic email form or link out to a Mailchimp or WordPress.com Form block.
✅ Affiliate Promos
Promote your own product or affiliate offers subtly. For example, you can link to your affiliate landing page from within the popup.
Real Use Cases: When a Manual Popup Makes Sense
- WordPress.com Free/Premium Plans: Add popups without upgrading
- Minimalist Websites: Clean design, no plugin clutter
- Lead Magnets: Offer a PDF, course, or download without using a plugin
- Urgent Updates: Announce sales, site changes, or time-sensitive messages
Common Issues to Avoid
- Forgetting to close your tags (
</div>,</script>, etc.) - Placing code in the wrong area (test on a staging page first)
- Overusing popups (annoying users = lower conversions)
- Using JavaScript that conflicts with your theme or builder
If you’re on a WordPress.com plan and can’t access the footer or Additional CSS, consider upgrading to the WordPress.com Business Plan to unlock full customization.
Final Thoughts
If you scrolled straight to the bottom of this article (and let’s be honest, a lot of us do), here’s the key takeaway:
Yes, you can absolutely create a popup in WordPress without a plugin, and it’s easier than most people think. Whether you’re using WordPress.com and trying to avoid upgrading plans, or you’re simply looking to keep your site fast and lean, the manual methods we’ve outlined above give you full control with zero bloat.
These approaches aren’t just stopgaps, they’re long-term solutions that help you build skills and keep your tech stack clean. If you want even more advanced behavior like exit-intent or multi-step modals, those are possible too with just a bit more JavaScript.
If you’re someone who values performance, flexibility, and deeper knowledge of how your site works under the hood, going plugin-free for popups is one of the smartest moves you can make.
Want an easier route or more automation? Check out our guide on the Best Popup Plugin for WordPress.
FAQ
Can I make a popup in WordPress with just HTML?
Yes, but you’ll also need CSS for styling and JavaScript for interactivity.
Will this method work on WordPress.com?
Yes, as long as your plan allows Custom HTML and Additional CSS. Plugins are not required.
Can I trigger a popup on scroll or exit?
Yes, but it requires more advanced JavaScript. We’ll cover that in a future guide.
Does this method slow down my site?
No, it’s lighter than using most popup plugins.
What’s the safest way to add code to WordPress?
Use a child theme, the Additional CSS panel, or a custom HTML block. Always test on a draft or staging site first.
Can I use Jetpack instead of a popup plugin?
Jetpack doesn’t include built-in popup features, but you can use its Form blocks and add them into a popup layout manually.
What if my popup doesn’t show up?
Check for typos, make sure the JavaScript is at the bottom of the page, and confirm your plan allows custom code.
Is this mobile responsive?
Yes, the example CSS uses flex and percentage widths to ensure it centers properly on all screens.
Internal Links (AH Web Works)
- Best Popup Plugin for WordPress
- Make an Affiliate Website in 5 Minutes
- Website Without Coding
- What is Jetpack for WordPress?
External Links
- Mailchimp – for embedding email opt-ins
- WordPress.com Business Plan Pricing Page – upgrade info

What do you think?