Skip to main content
All CollectionsSticky Add to CartHiding / showing the app on store pages
Hiding Sticky Add to Cart on certain pages (before page load)
Hiding Sticky Add to Cart on certain pages (before page load)
Mollie Herbert avatar
Written by Mollie Herbert
Updated over 6 months ago

Place this code inside the theme.liquid file before the </head> line:

<script>var disabledPages = ["YOUR PRODUCT NAME"];window.stickySetDoNotShow = disabledPages.some(e=>{return window.location.pathname.includes(e)});</script>

Make sure to replace YOUR PRODUCT NAME with your product name from the product page URL.

For example, if you want to hide it from this page:

Use:

<script>var disabledPages = ["blue-silk-tuxedo"];window.stickySetDoNotShow = disabledPages.some(e=>{return window.location.pathname.includes(e)});</script>

You can extend this logic to more product pages, as such:

<script>var disabledPages = ["YOUR PRODUCT NAME 1","YOUR PRODUCT NAME 2","YOUR PRODUCT NAME 3",];window.stickySetDoNotShow = disabledPages.some(e=>{return window.location.pathname.includes(e)});</script>

Need help with customizing the Sticky ATC to your shop? We're here for you.

Send us a messages and our team will be more than happy to fit the app to your needs.

Did this answer your question?