Remove 'empty' filters on 2.0

Hi,

I am using an edited version of the Dawn theme.

I want to set up my menu system such that it includes some collections with filters applied.

In doing so I have some other filters available that then have no valid options.

I would like to hide these ‘empty’ filters but can’t see how.

Imagine the following extreme example: I have a collection called clothes which includes socks and shirts. If I filter the collection by shirts, I am left with a filter for shoe size with a list of empty options that I can’t pick. I would like to be able to find the shoe size option once I’ve chosen shirts.

I realise that in the above case the answer would be to have the socks and shirts as separate collections, but I’m trying to create a simple example without having to go into endless details.

Thanks

1 Like

Hi @Online_Seller did you try any product filtering solution? As I understand, if you use a product filter app, it will help you hide empty filters by default.

No, I was hoping to not depend on third party solutions.

Should be able to target with CSS, your classes may differ but I achieved this with:

label.item.facet-checkbox.facet-checkbox–disabled {
display: none !important;
}

If Shopify, with all the billions they’re pulling in, can’t make fundamental things work, hacky ways it is…

1 Like