Reveal Section On Scroll - Only On Select Pages Dawn

marvic
Explorer
51 4 7

Hi team,

 

anyone knows how to activate the "reveal on scroll" feature for selected pages? It seems to be a theme setting and we don't want this effect all over our page but only for specific collection pages to make the journey a bit more engaging. Theme backbone is Dawn.

Any help is much appreciated!

Replies 7 (7)

Dan-From-Ryviu
Shopify Partner
7011 1325 1351

Hi @marvic 

Could you share your store URL and pages you want that section activate? 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

marvic
Explorer
51 4 7

Hi Dan,

the shop we're working on is not published yet! Any general advice how this could be done? It'll be some of our collection pages in the format website.com/collections/collection

I assume we'd have to do something to the collection.liquid file and maybe to the base file to load a script for the section reveal?!

Dan-From-Ryviu
Shopify Partner
7011 1325 1351

Go to your store admin > Online store > Themes > click 3 dots button > Edit code in theme you want to make scroll header, open theme.liquid file, add this code after <head> element

{%- if template.name == 'collection' -%}
<style>
.section-header { top: 0px !important; }
</style>
{%- endif -%}

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

marvic
Explorer
51 4 7

This adds CSS to the header section?

PageFly-Oliver
Globetrotter
717 142 134

Hi @marvic ,

 

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file -> Save

 

{%- if template contains  'collection' -%}
<style>
#MainContent .section-header { top:0; }
</style>
{%- endif -%}

 

 

Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

marvic
Explorer
51 4 7

This does not work. It also looks like the code injects CSS into the header section?

marvic
Explorer
51 4 7

This is more complex than I though