Shopify themes, liquid, logos, and UX
I have a clothing store and would like to give customers the option to filter collection pages by "Colour". I have multiple tags within product pages that I do not want shown. When I go into the Filter section of Shopify and create a new filter called "Colour" and source it from the "Tags" option, every single tag I have appears on the Collection Page. How can I make sure only the colour tags are showing and not all the other tags I have setup that I'm using to organize in the backend?
Thanks in advance!
Hello @BoulevardNorth ,
Check the theme settings for the option to exclude the tags which you don't want.
If that option is not available in the theme you are using you need to find the existing code and modify it so the tags you don't want will not appears .
e.g.
lets say my existing code is:
{% for tag in collection.all_tags %}
<a href="{{ collection.url }}?filter={{ tag }}">{{ tag }}</a>
{% endfor %}
and I want to modify it to exclude tags "tag1,tag2,tag3" then after modification my code will be
{% assign allowed_tags = "tag1,tag2,tag3" | split: ',' %}
{% for tag in collection.all_tags %}
{% if allowed_tags contains tag %}
<a href="{{ collection.url }}?filter={{ tag }}">{{ tag }}</a>
{% endif %}
{% endfor %}
Thanks
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025