How to close the filter list as default

Not applicable

Hello There , 


Is there any way to close the filter list as default when the website loads.

Site Url ::


7.png  Thank You!!!

Replies 3 (3)

Shopify Partner
159 38 41

hi @Anonymous 

Its SideNode! We will be happy to help you today.

You can try this code: it will be helpful to you

  1. Access your online store.
  2. Navigate to the "Theme" section.
  3. Choose the "Edit code" option.
  4. Locate the theme.liquid file.
  5. Open the theme.liquid file.
  6. Scroll to the bottom of the file.
  7. Add the desired code just before the closing </body> tag.


window.addEventListener("load", function() {
  const elements = document.querySelectorAll(".facets__disclosure-vertical");
  elements.forEach(function(element) {


If I was able to assist you, please remember to give it a Like and Mark it as the Solution!

Let me know if need further assistance

If helpful, please Like and Accept this Solution to help others
New Member
14 0 0

I tried this and it did not work.  Are there parameters I need to fill in to the code still?  As with the OP, I don't like that the filter list is automatically set to the open position when arriving at the page.  It would be much cleaner if the filter list was closed, and could be opened by the user if desired.  We have our filter list set on the left hand side of the page, to the left of the products.

New Member
14 0 0

Looking for same answer.  Code posted below didn't work for me, unless I am missing something.