Product Filters - hide filters with a single value

Product Filters - hide filters with a single value

Bath4All
Excursionist
29 0 4

Hi, is there a way to not show filters where there is only one option? Because it's useless... 

I'm on the Empire theme if that matters.

 

Screenshot 2025-04-13 at 9.11.25 PM.png

 

Thank you

Replies 7 (7)

wo
Shopify Partner
218 45 47

In the Search & Discovery app, find the Filters, select Brand, and delete it.

Bath4All
Excursionist
29 0 4

You misunderstood. This has nothing to do with the Brand filter. I only need it to NOT show up when there is only one option value available. When the search result has items in several brands - the Brand filter shows multiple options, and therefore is needed. 

 

Screenshot 2025-04-13 at 10.14.01 PM.png

 

 

wo
Shopify Partner
218 45 47

In the theme editor, find facets.liquid. Your theme may be different. Anyway, find the code for the filter on the collection page. Find code that looks like this.

{% case filter.type %}
{% when 'boolean', 'list' %}
xxxx
{% when 'price_range' %}
xxxx
{% endcase %}


Modify the code

{% case filter.type %}
{% when 'boolean', 'list' %}
{% if filter.values.size > 1 %}
xxxx
{% endif %}
{% when 'price_range' %}
xxxx
{% endcase %}

 

xyrentech
Visitor
3 0 0

yes there is a way to do that if you are suing the empire theme go to your theme setting
online store >theme> customization
collection page
check fillter 
and hide it

hit me up if it workd

edward_m
Visitor
1 0 0

You’re right. Filters like Brand with just one option don’t add much value. Luckily, on the Empire theme, there’s a clever way to handle this, but it’s not obvious at first glance.

Let’s just say it can be done, and it makes the filter area much cleaner.

namphan
Shopify Partner
2692 349 397

Hi @Bath4All,

Please go to Actions > Edit code > snippets > facets.liquid file and send me the code.

I will check and guide you

Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com

Dotsquares
Shopify Partner
441 28 59

hi @Bath4All 

If you're using the Empire theme, follow these steps:

  • Go to Online Store > Themes > Customize.
  • Navigate to the Collection Page section.
  • Look for the Filter option.

Simply uncheck or hide it to remove the collection title from above the images (if that’s what's causing the layout).

Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio