Someone on your team set up a newsletter popup or a festive offer banner. Now customers are complaining. On their phone the little × is nowhere to be seen, or they tap it and nothing happens, or they close it and it is back on the very next page. One person says they gave up and left the site.
A WordPress popup not closing is worth fixing quickly, because it blocks the one thing a visitor came to do. The good news is that it nearly always falls into one of two groups: the popup cannot be closed at all, or it closes but keeps coming back. Each has its own causes, so start by deciding which you have.
Can it be closed at all, or does it just return?
Test it yourself the way a new visitor would. Open the site in a private window, so no earlier cookies apply, on a phone as well as a computer.
- The × is missing, does nothing, or the popup ignores clicks outside it. That is a closing failure. Go to the next section.
- It closes, then appears again on the next page, the next visit, or after a refresh. That is a memory failure: the popup is not remembering that it was dismissed. Skip to “Why the popup keeps showing”.
WordPress popup not closing at all: the usual causes
The close button is off the screen on phones
This is a frequent version of the complaint. A popup designed at desktop width is often taller than a phone screen. If the close button sits in the top corner and the popup is centred vertically, the top, and the ×, can end up above the visible area, where the visitor cannot reach it. Some popups also put the close button outside the box itself, which works on a large screen and gets cut off on a small one.
Check the popup tool’s mobile preview, or use your browser’s developer tools to view the page at a phone width. Fixes include a smaller popup on mobile, a close button inside the box, letting the popup scroll, or not showing that popup on phones at all. Our guide to layouts that break on mobile covers the wider issue of designs that do not fit small screens.
The close button is there, but a script has failed
The × on most popups is not a link. Pressing it runs a small piece of JavaScript that hides the box. If that script, or any script loaded before it, has thrown an error, the button looks fine and does nothing. A speed plugin that delays or combines JavaScript can cause the same thing by holding the popup’s script back.
Open the browser console (right-click, Inspect, Console) and reload. A red error message is the clue. If your speed plugin has a “delay JavaScript” or “defer” option, exclude the popup plugin’s scripts and test again in a private window.
Another layer is sitting on top of the button
A sticky header, a chat widget or a cookie banner can overlap the popup’s corner, so taps land on that element instead of the ×. Right-click the close button and choose Inspect: if the highlighted element is not the close button, something is covering it. Our guide on buttons that cannot be clicked explains how to read what the browser highlights.
Two popup tools are fighting
Themes, page builders and marketing plugins can each include their own popup system. If an old popup from a theme and a new one from a plugin both fire, closing one leaves the other, and it looks as though the popup will not close. Check the theme options, the page builder’s popup or template library, and the plugins list for anything that makes popups, and turn off the ones you are not using.
Why the popup keeps showing after it is closed
A popup remembers that you closed it by setting a cookie, or by saving a note in the browser’s local storage. Next time it loads, it checks for that note and stays hidden if it finds one. When a popup keeps showing, something in that loop has failed.
The display rules say “every time”
Check the popup’s trigger and frequency settings first. Options often include “show on every page load”, “once per session”, “once every so many days” or “once per visitor”. A popup set to every page load is working as configured, however annoying it is. Setting it to show once and then stay hidden for a sensible number of days usually solves the complaint on its own.
Page caching is serving a copy with the popup forced on
Most popup tools decide in the visitor’s browser whether to show the popup, which works well with caching. Some older or simpler setups decide on the server instead, and a cached page then shows every visitor the same decision. If clearing the cache changes behaviour, or logged-in users (who often bypass the cache) do not see the problem, caching is involved. Look in the popup plugin’s settings for an option about compatibility with page caching.
The cookie is not being kept
Cookies are tied to a domain. If parts of the site are served from www.example.com and other parts from example.com, a cookie set on one may not be seen on the other, so the popup reappears as visitors move around. Make sure the site redirects to a single version of its address. Visitors who block cookies, or browse in private windows, will also see the popup again each time, which is not something the site can change.
The popup’s settings were reset or the popup was duplicated
Some tools track dismissal per popup ID. If someone duplicated a popup to edit it and published the copy, visitors who closed the old one see the “new” one. Check the popup list for near-identical entries and remove the extras.
Popups and the people who cannot use a mouse
A popup that can only be closed by clicking a small × fails visitors who use a keyboard or a screen reader. A well-built popup should close when the Escape key is pressed, move keyboard focus into the popup when it opens, and return focus to the page when it closes. Try it: open the popup and press Escape, then press Tab and see whether the focus stays inside the popup or wanders behind it. Our website accessibility checklist covers this alongside other keyboard checks.
A word on popups and search
Google’s search guidance has long discouraged intrusive interstitials, meaning popups that cover the main content as soon as a visitor arrives from search, especially on mobile. A small banner or a popup that appears after some time or scrolling is a different thing from a full-screen box that hides the page. If your popup covers everything on a phone, that is one more reason to make it smaller there, quite apart from the closing problem.
What a well-behaved popup looks like
Once the fault is fixed, it is worth setting a few rules so the next popup does not cause the same complaints. Show it once, then leave the visitor alone for a reasonable number of days. Wait until they have read or scrolled a little rather than firing the moment the page opens. Keep it smaller than the screen on a phone, with the close button inside the box and large enough to tap with a thumb. Make the purpose obvious in one line. And give it an end date if it is tied to a sale, so a Diwali or Christmas offer is not still appearing in March because nobody remembered to switch it off.
A short checklist for the person who set it up
- Open the site in a private window on a phone and try to close the popup.
- Note whether it fails to close, or closes and returns.
- Check the frequency setting: once per visitor or session, not every page load.
- Check the mobile size and where the close button sits.
- Look in the browser console for red errors.
- List every tool on the site that can make popups, and turn off the unused ones.
- Confirm the site uses one address version, with or without www.
If you get through the list and the popup still will not close, or keeps returning, the next step usually involves reading the popup plugin’s scripts or the theme’s templates. If you would rather get help fixing a wordpress bug like this than experiment on a live site, that page explains what we look at and how pricing works.
Until it is sorted, it is often kinder to switch the popup off entirely. Nobody misses an offer box, but they do remember a site they could not get into.