Dawn Theme - Make Collection Filter & Sort Sticky

Topic summary

A Shopify store owner using the Dawn theme wants to make the collection filter and sort section sticky below the header when scrolling, particularly on mobile devices.

Problem:

  • User has a sticky header enabled
  • Wants the filter/sort controls to remain visible while scrolling through collection pages
  • Preference for mobile, but desktop implementation also acceptable

Solution Provided:
Two community members (@BrewBrains and @Anshul_arora) offered similar CSS-based solutions:

  • Add custom code to the theme.liquid file before the closing </body> tag
  • The code uses CSS positioning to make the filter section sticky

Outcome:

  • The solution from @Anshul_arora was confirmed working by the original poster
  • Issue marked as resolved

Follow-up Question:
Another user (@NiyatiS) asked if the same solution would work for the Craft theme, but this remains unanswered.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hi Community

I’ve not been able to find a solution to this in the forums, so not sure if it is even possible.

I have sort and filter enabled on my collection pages on Dawn Theme. I currently have a sticky header enabled across all pages. I was looking to also make the “sort and filter” section sticky underneath the header on scroll.

This is a preference for mobile, but would be happy if this could be sticky on both mobile and desktop.

This theme is currently in preview (not my live site), so here is a temporary preview URL:

https://cp04z7bbr9rzqsf6-78302052681.shopifypreview.com

I’ve also shared a screenshot of what I am trying to achieve.

Hi @Asiela ,

You can add code by following these steps to make the filter sticky below the navbar as in the screenshot for mobile only.

  1. Go to Online Store → Theme → Edit code.
    2. Open your theme.liquid file
  2. Paste the below code before on theme.liquid

If you need any further assistance or have any queries, feel free to contact me.

Was my reply helpful? Click Like to let me know!

Was your question answered? Mark it as an Accepted Solution and click like.

Hello @Asiela ,

Please add the below mentioned code in your theme.liquid file before tag and save


The code may help you to make the collection filter sticky.

Output =>

Please share if you have any query.

Thank you.

2 Likes

Hi @Anshul_arora . This worked perfectly, thanks for taking the time to share this.

Can this work for craft theme?