Hello.
I am trying to show a list of product tags with prefix “use-” on the top page as below.
But it doesn’t show all the tags and weirdly shows different set/type of them each day.
Could you help me solve this problem?
{% assign tag_list = "" %}
{% for product in collections.all.products %}
{% for tag in product.tags %}
{% if tag contains 'use-' %}
{% assign tag_list = tag_list | append: "," | append: tag %}
{% endif %}
{% endfor %}
{% endfor %}
{% assign tag_list = tag_list | remove_first: "," %}
{% assign tag_array = tag_list | split: "," | uniq %}
##
{{section.settings.title}}
{% for tag in tag_array %}
- #{{ tag | replace:'use-','' }}
{% endfor %}