How to show current tags filter in Shopify only if the current tags are more than 1

Highlighted
Shopify Partner
4 1 0

Hi Everyone

I need help please with showing the tags filter only if the current tags are more than 1, Currently my filter shows even in the case on a single tag. I tried the following but couldn't find the exact liquid syntax:

                  <dd>
                <ol>
                  {% for t in tags %}
                    {% assign tag = t | strip %}
                    {% assign tag_value = tag | handleize %} 

                    {% if current_tags contains tag %}
                    {% if current_tags > 1 %}
                      <li>
                        <input type="checkbox" value="{{ tag_value }}" checked/>
                        <label>{{ tag }}</label>
                      </li>
                    {% else %}
                      {% if collection.tags contains tag %} 
                        <li>
                          <input type="checkbox" value="{{ tag_value }}"/>
                          <label>{{ tag }}</label>
                        </li>
                        {% endif %}
                      {% endif %}
                    {% endif %}
                  {% endfor %}
                </ol>
              </dd>

 

Thanks in advance

0 Likes
Highlighted
Shopify Partner
190 38 39

@Flipporama 

Show product filter by tag if product tag contain more then 1 tag.

{% if collection.all_tags.size > 1 %}

your filter tag code for show the select box

{% endif %}

For Design, Development and custom changes Hire Me.
If your problem solved then Like & Accept this Solution.
Email ID: technicalvishvas@gmail.com
0 Likes