Debut: Hiding Shopify product tags using a custom prefix

Solved
ctsimon
New Member
7 0 0

 

Hey team,

 

I am trying to follow the second half of this help doc: https://burstcommerce.com/how-to-hide-shopify-product-tags-from-collection-filters/

 

But I am not sure which file to input the code below into. Please kindly help, thanks!

<div class="clearfix filter">
  <p>Browse by tag:</p>
  <select class="coll-filter">
    <option value="">All</option>
    {% for tag in collection.all_tags %}
      {% assign prefix = tag | slice: 0 %}
      {% if prefix == '_' %}
        {% continue %}
      {% endif %}
      {% if current_tags contains tag %}
        <option value="{{ tag | handle }}" selected>{{ tag }}</option>
      {% else %}
        <option value="{{ tag | handle }}">{{ tag }}</option>
      {% endif %}
    {% endfor %}
  </select>
</div>

 

Accepted Solution (1)

Accepted Solutions
LitExtension
Shopify Partner
1990 332 408

This is an accepted solution.

Hi @ctsimon,

Go to sections > collection-template.liquid file, find 'for tag in collection.all_tags'. 

You will need to change the code here: https://i.imgur.com/FGzcPAb.png

Hope it helps!

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!

View solution in original post

Replies 3 (3)
LitExtension
Shopify Partner
1990 332 408

This is an accepted solution.

Hi @ctsimon,

Go to sections > collection-template.liquid file, find 'for tag in collection.all_tags'. 

You will need to change the code here: https://i.imgur.com/FGzcPAb.png

Hope it helps!

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!

View solution in original post

ctsimon
New Member
7 0 0

Thank you very much! @LitExtension 

Do you know where i can put the code for the: 

Hiding Shopify product tags using a predefined list of hidden tags

 

 

{% assign exclude_tags = "ghost,worst-seller" | split: ',' %}

 

LitExtension
Shopify Partner
1990 332 408

Hi @ctsimon,

It's just a declaration of tags, you can just add it here: https://i.imgur.com/GjK37pA.png 

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Are you looking for a solution to migrate to Shopify? Contact us for further assistance.
Try our FREE DEMO now!