Product Filters - hide filters with a single value

Topic summary

A user seeks to hide product filters that display only a single option value, as these provide no filtering utility. The issue occurs on the Empire theme where filters like “Brand” appear even when only one brand is present in search results.

Technical Solution Provided:

  • Modify the facets.liquid file in the theme editor
  • Add a conditional check {% if filter.values.size > 1 %} around the filter display code
  • This ensures filters only render when multiple values exist

Code Structure:
The solution involves wrapping the 'boolean' and 'list' filter cases with a size check, preventing single-option filters from displaying while preserving multi-option filters.

Status:
Multiple users offered to provide specific guidance if the original poster shares their facets.liquid code. Some responses misunderstood the request as wanting to remove filters entirely rather than conditionally hiding them. The discussion remains open with the technical approach identified but not yet confirmed as implemented.

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

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.

Thank you

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

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.

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 %}

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

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.

Hi @Bath4All ,

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

I will check and guide you

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).