Related products by custom tag not showing

Hey, guys. I have a product that has the following tags

stressedowner_0-1652433859434.png

My code for it is like this


  {% for tag in product.tags %}
  - {{ tag }}
  {% endfor %}

Now when I try this code, it’s now showing any product. Even when I change “Lace Up” to “Safety” or “Zip Side”. Why is that? What am I doing wrong?

{% for product in collections.all.products %}   
  {% if product.tags contains "Lace Up" %} 
    {{ product.title }} 
  {% endif %}
{% endfor %}

Hi @stressedowner ,

I have checked and your code works fine.

Can you send me the site link, I will check it

Hey @LitExtension ! I DMed you the link :))) Thanks!

Hi @stressedowner ,

You can change the code:

{% for product_tag in collections.all.products %}   
  {% if product_tag.tags contains "Lace Up" %} 
    {{ product_tag.title }} 
  {% endif %}
{% endfor %}

If it still doesn’t work, please create a staff account. I will check it