Hello,
I have a newsletter popup on my store that shows on all pages, I want it to only show in the homepage, How can I do so?
here is my site url https://wordsworthandblack.com/
Topic summary
A Shopify store owner wants to restrict their newsletter popup to display only on the homepage instead of appearing across all pages.
Proposed Solution:
A PageFly representative suggests adding custom CSS code to control popup visibility:
- Navigate to: Online Store → Theme → Edit code
- Open: Assets → theme.css
- Add CSS targeting the popup element to hide it on non-homepage templates
The solution involves using a CSS selector that hides the newsletter popup section when the body doesn’t have the homepage template class. A code snippet was provided but appears corrupted/reversed in the original message, making the exact implementation unclear.
Status: The question received one response with a technical approach, but the discussion remains open without confirmation of whether the solution worked.
Hi @RA2411 ,
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/theme.css->paste below code at the bottom of the file:
body:not(.template-index) #shopify-section-newsletter-popup {
display: none !important
}
I hope it would help you
Best regards,
Kate | PageFly