Keep Collection Page Filters Open - Focal Theme

Hello, we are looking for a code we can add so all filters on the collection pages are open at all times. Currently our theme only allows us to keep the first filter open. I’ve attached a photo to show how it should look, thank you!

Here is a link to the site: https://pondstream.com/collections/pond-fountain-timers

Hi, HDkingy, I don’t know what theme you are using, but there is this element in the structure of the filters:


the closed ones will have aria-expanded=“false”, you can force that in the code to always be aria-expanded=“true”, such as the following code


Hello @hdkingy :waving_hand:

In Shopify Admin, you can go to Edit theme code, open file custom.js and add this code at the bottom

let filters = document.querySelectorAll('.product-facet__filter-item')
filters.forEach(filter => {
    filter.querySelector('button').setAttribute('aria-expanded', true)
    filter.querySelector('collapsible-content').style.overflow = 'visible'
})

Hope that helps!

Worked perfect, thanks!

You are welcome :slightly_smiling_face: