I’m using this code to show tags under products. but it returns all the tags. I need to limit that to 4 tags only.
tags: {% for tag in product.tags %} {{ tag | handleize }}{% unless forloop.last %}{% endunless %} {% endfor %}
I’m using this code to show tags under products. but it returns all the tags. I need to limit that to 4 tags only.
tags: {% for tag in product.tags %} {{ tag | handleize }}{% unless forloop.last %}{% endunless %} {% endfor %}
Hello There,
add this one code.
**tags:**
{% for tag in product.tags limit:4 %}
{{ tag | handleize }}{% unless forloop.last %}{% endunless %}
{% endfor %}
Thanks so much.
Thank you for your response. It’s good to know that it’s worked for you. Kindly feel free to get back to me if you need any further assistance.
Hi, thank you for posting this code to show tags on products. I tried it and it worked on the SYMMETRY theme.
However, the Shopify editor gave me a broken HTML error alert in ‘sections/main-product.liquid’
Could this be because we are in theme preview mode still and it is trying to access code from IMPULSE?
Thank you for any help!
C.