How to set filtering & sorting accordions closed as default?

Topic summary

A user working with the Tinker 1.0.5 theme needed to change the default state of filtering and sorting accordions on collection pages from open to closed, as too many visible options were overwhelming visitors.

Solution provided:

  • Access Shopify Admin → Online Store → Themes → Actions → Edit code
  • Locate the theme.liquid file
  • Insert custom JavaScript code above the closing </body> tag
  • A screenshot reference was provided to show exact placement

Outcome:
The solution successfully resolved the issue. The user confirmed it worked perfectly, allowing customers to discover filtering options by clicking rather than seeing all accordions expanded by default.

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

Filtering & Sorting accordions are all open as default when page loads. With so many filtering options, I’m trying to close all the accordions for people to then click on and discover further.

Using Tinker 1.0.5

Hi @HBaars ,

Can you send through a screenshot so I can see what you see?

Thank,
Jake

Hello @HBaars

Please follow the steps below after logging into the Shopify admin:

  • Go to your Shopify Admin panel.

  • Click on Online Store > Themes.

  • Find the theme you want to edit and then click Actions > Edit code.

  • Search theme.liquid

Insert the provided Script code at the above of the closing of the body() tag
SS : https://prnt.sc/_D8KD40wFkJK


Please hit Like and Mark it as a Solution if you find our reply helpful.

1 Like

This worked perfectly - thank you!

Hello @HBaars

Glad to hear that! Happy to help :blush: