raeroshow Posted January 12, 2021 Share Posted January 12, 2021 Site URL: https://www.90daybusinesslaunch.com Hi all! PW: Peaceout$2020 I'm adding HTML to my site-wide header that is creating a pop-up on the website. We'd like for the pop-up to be excluded, however, from appearing on a few pages. This pop up is going to change somewhat often. Therefore, rather than going in and adding this code on each individual page's header code, i'd like to put it in Site-wide header, with some Javascript that says to exclude the html from pages x,y,z. Can anyone provide JS that could make that happen? ( Could filter by page name or Page Content ID number?) This is the code for my pop-up that is injected into site-wide header: <a href="#lightbox_popups2" data-timeout="3" data-expires="30" class="js-auto-open-lightbox" hidden></a> I am using the Lightbox Anything plug-in . Thank you! Rachel ************************************* Let's Make a Website! Rachel (she/her) | Squarespace Websites LetsMakeaSite.com Link to comment
tuanphan Posted January 17, 2021 Share Posted January 17, 2021 To hide lightbox on One Page, add this code to Page Header <style> [href*="lightbox_popups2"] { display: none !important; } </style> or add this to Design > Custom CSS #page1-id, #page2-id, #page3-id { [href*="lightbox_popups2"] { display: none !important; } } Find ID with this guide. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.