Marketing · Gutenberg
Newsletter Popup block for WordPress
Email capture popup that triggers on scroll, time delay, or exit intent. Cookie-based dismissal, image support, and success state.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Email capture popup that triggers on scroll, time delay, or exit intent. Cookie-based dismissal, image support, and success state.
Inspector panels on this block: Content, Email Form, Decorative Image, Trigger, Behaviour, Appearance. Those titles come from index.js, not from a shared template.
Behavior controls: “Image position” options: No image, Top banner, Left side, Right side; “Trigger type” options: Time delay, Scroll depth, Both (delay + scroll); “Cookie name” (Unique key to remember dismissed state. Change to re-show to returning visitors).
Where to find it
Gutenberg inserter → Marketing → search “Newsletter Popup” (block name `blockenberg/newsletter-popup` in block.json). Style it in the sidebar after insert.
How to use Newsletter Popup block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Newsletter Popup”, insert it. Category: Marketing.
- Configure inspector controls that exist on this block. Open Content. Set “Heading”, “Input placeholder”, “Button label”, “Success message”.
- Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Heading | Text field in the inspector. block.json default: Don't miss out! 🎁. Saved as `heading`. |
| Input placeholder | Text field in the inspector. block.json default: Enter your email address. Saved as `emailPlaceholder`. |
| Button label | Text field in the inspector. block.json default: Subscribe Now. Saved as `buttonLabel`. |
| Success message | Text field in the inspector. block.json default: 🎉 You're in! Check your inbox for a welcome email.. Saved as `successMessage`. |
| Success sub-message | Text field in the inspector. block.json default: You can unsubscribe at any time.. Saved as `successSubtext`. |
| Image position | Select control; the chosen value is saved on the block. Options: No image; Top banner; Left side; Right side. block.json default: none. Saved as `imagePosition`. |
| Trigger type | Select control; the chosen value is saved on the block. Options: Time delay; Scroll depth; Both (delay + scroll). block.json default: delay. Saved as `triggerType`. |
| Delay (seconds) | Numeric range control in the inspector. Range 1–60. block.json default: 5. Saved as `delaySeconds`. |
| Scroll depth (%) | Numeric range control in the inspector. Range 5–95. block.json default: 40. Saved as `scrollPercent`. |
| Also trigger on exit intent (mobile: 15s) | On/off toggle in the inspector. Off by default. Saved as `exitIntent`. |
| Cookie name | Text field in the inspector. Unique key to remember dismissed state. Change to re-show to returning visitors. block.json default: bkbg-nlpop. Saved as `cookieName`. |
| Suppress for (days) | Numeric range control in the inspector. Range 0–365. block.json default: 7. Saved as `cookieDays`. |
| Show close button | On/off toggle in the inspector. On by default. Saved as `showClose`. |
| Close on overlay click | On/off toggle in the inspector. On by default. Saved as `overlayClickClose`. |
| Max width (px) | Numeric range control in the inspector. Range 300–900. block.json default: 520. Saved as `maxWidth`. |
| Border radius (px) | Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `borderRadius`. |
| Padding (px) | Numeric range control in the inspector. Range 12–80. block.json default: 40. Saved as `padding`. |
| Overlay opacity (%) | Numeric range control in the inspector. Range 0–95. block.json default: 60. Saved as `overlayOpacity`. |
| CTA Button Font Size | Numeric range control in the inspector. Range 10–28. block.json default: 15. Saved as `ctaSize`. |
| Overlay background | Color control in the inspector. block.json default: #000000. Saved as `overlayBg`. |
| Popup background | Color control in the inspector. block.json default: #ffffff. Saved as `popupBg`. |
| Heading color | Color control in the inspector. block.json default: #111827. Saved as `headingColor`. |
| Body text color | Color control in the inspector. block.json default: #6b7280. Saved as `textColor`. |
| Input background | Color control in the inspector. block.json default: #f9fafb. Saved as `inputBg`. |
| Input border | Color control in the inspector. block.json default: #d1d5db. Saved as `inputBorder`. |
| Input text color | Color control in the inspector. block.json default: #374151. Saved as `inputColor`. |
| Button background | Color control in the inspector. block.json default: #6366f1. Saved as `buttonBg`. |
| Button text color | Color control in the inspector. block.json default: #ffffff. Saved as `buttonColor`. |
| Close button background | Color control in the inspector. block.json default: #f3f4f6. Saved as `closeBg`. |
| Close button color | Color control in the inspector. block.json default: #6b7280. Saved as `closeColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts, data-rendered.
- It writes to localStorage in the visitor’s browser, not to wp_options.
- Keyboard handlers move focus between items.
When this is the right block
- Email capture popup that triggers on scroll, time delay, or exit intent. Cookie-based dismissal, image support, and success state — that is the job of Newsletter Popup, not a generic content block.
- Use it when you need the editor control labeled “Heading”, which exists on this block’s inspector.
- It matches pages about newsletter, popup, email.
- Inserter grouping: landing pages, campaign sections, and conversion layouts.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Newsletter Popup block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Newsletter Popup”. It sits under Marketing. After insert, open Content and set “Heading”, “Input placeholder”, “Button label”, “Success message”.
Where does Newsletter Popup store visitor state?
In localStorage on that browser. Clearing site data resets it. It is not a WordPress user meta field unless render.php says so.
Is the Newsletter Popup Gutenberg block free?
Yes. Newsletter Popup ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Newsletter Popup to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Email Form, Decorative Image, Trigger).
Related marketing blocks
Newsletter Signup
Email opt-in form that stores subscribers via the built-in /subscribe REST endpoint.
Newsletter Section
Full newsletter landing section with past issue previews, subscriber count social proof, benefits bullets, and a prominent subscribe form. Distinct from a simple newsletter widget.
Popup
Popup/lightbox builder with a configurable trigger button and rich popup content — heading, text, image, CTA and close. Supports click, scroll-depth, time-delay and exit-intent triggers.
Split Form
Side-by-side lead generation section — content (heading, text, feature bullets) on one side and a fully configured email / sign-up form on the other.
Content Lock
Gate content behind an email opt-in, password, or click-reveal. Perfect for lead generation, member content, and spoilers.
Lead Magnet
Free resource / lead magnet landing section. Features a mockup image (book, PDF, phone), headline, benefit checklist, and an email capture form with privacy note. Ideal for e-books, templates, checklists, and courses.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Newsletter Popup from the Gutenberg inserter.