How to add a popup to your WordPress site
One snippet in your site's header. There are two ways to get it there — a plugin, which we recommend, or your theme directly if you're comfortable editing it.
Self-hosted vs WordPress.com: if you run your own WordPress install, either method below works on any plan.
If your site is hosted on WordPress.com, custom scripts and plugins are only available on their higher business-level plans. On a free or personal WordPress.com site, the snippet can't run.
Survives theme updates and needs no code editing.
-
Copy your DailyPopup snippet
Sign in to DailyPopup and open the install screen. Copy the single line of code — it already has your site key in it.
<script src="https://dailypopup.com/embed.js" data-dailypopup="YOUR-KEY" async></script>Your real snippet has an actual key where YOUR-KEY is. Don't edit it.
-
Install a header and footer plugin
In the WordPress admin go to Plugins → Add New and search for a header-and-footer code plugin. WPCode is the most widely used, but any plugin that inserts code into the header works the same way.
Install and activate it.
-
Paste it into the header field
Open the plugin's settings and find the field labelled Header (sometimes "Scripts in Header"). Paste the snippet there and save.
-
Check your live site
Open your site in a new tab. Publish a test popup in DailyPopup, reload, and it should appear about two seconds after the page loads.
If you use a caching plugin, clear the cache once so the updated page gets served.
No plugin, but you must use a child theme or it will be erased on the next update.
-
Use a child theme
If you paste code into a parent theme, the next theme update wipes it out. Set up a child theme first, or use Option A instead.
-
Open header.php
Go to Appearance → Theme File Editor and open header.php. Some hosts disable this editor, in which case edit the file over SFTP.
-
Paste before </head>
Add the snippet on its own line immediately before the closing </head> tag, then update the file.
If it doesn't show up
Your cache is serving an old page
The most common cause on WordPress. Clear your caching plugin and your host's cache, then reload.
It went in the footer field
Move it to the header field and save again.
Nothing is scheduled
The snippet only draws a popup when one is running. Check your test popup is live and hasn't expired.
You already dismissed it today
Popups show once per visitor per day by design. Open a private window to see it again.
Common questions
Will it conflict with my other plugins?
It shouldn't. The script is tiny, loads asynchronously after your page, and renders in an isolated container so it can't clash with your theme or other plugins.
Will a caching plugin stop it working?
No, but clear your cache once after adding the snippet. Popup content is fetched live, so caching never delays your actual updates.
Can I remove it later?
Yes. Delete the line from the plugin field (or your header file) and save. Nothing else changes.
I'd rather not touch any of this.
That's what white glove setup is for — we install it for you, usually within two business days. See pricing.
Free 10-day trial — no card required.