Shopify themes, liquid, logos, and UX
We are currently using an integration with simple consign that automatically passes tags through to shopify.
I've edited main-product.liquid to show the tags using:
<div class="product-tags"> {% for tag in product.tags %} <span class="tag">{{ tag }}</span> {% endfor %} </div>
However, I would like to restrict the automatic tags other than Height, Length and width from showing. How do I do this?
You can just use an `if` statement surrounding your `span.tag`.
{% if tag == 'Height' or tag == "Length" or tag == "width" %}
<span class="tag">{{ tag }}</span>
{% endif %}
Hi Tobe,
Thanks for responding. If I use this, it removes all the tags somehow. Where have I made an error?
<div class="product-tags">
{% for tag in product.tags %}
{% if tag == 'Height' or tag == "Length" or tag == "width" %}
<span class="tag">{{ tag }}</span>
{% endif %}
{% endfor %}
Thank you.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025