header.php directly, or using a free plugin if you prefer not to touch theme files.
Method 1: Manual via header.php (recommended)
Log in to your WordPress admin
Go to your WordPress dashboard (e.g.,
https://yoursite.com/wp-admin).Open the Theme Editor
Go to Appearance → Theme Editor (sometimes labelled Appearance → Theme File Editor).
Paste the Cool Popup snippet
Find the closing
</head> tag and paste the snippet on the line just before it.Edits to
header.php can be overwritten when you update your theme. To prevent this, use a child theme or install via the plugin method below.Method 2: Via the Insert Headers and Footers plugin
Install the plugin
Go to Plugins → Add New, search for Insert Headers and Footers, then install and activate it.
Finding your Site ID
ReplaceYOUR_SITE_ID with the value from Dashboard → Settings → Installation in your Cool Popup dashboard.
Verifying the installation
Visit your site, open browser DevTools (F12 or right-click → Inspect), and go to the Network tab. Reload the page and filter bypopup.js — you should see the script load with a 200 status code.