Hi,
I would like to add some SEO text at the bottom of my “all products” collection page.
Since I have set up color filters, I would like to change the text depending on which color filter is active.
Here is an example URL: https://senkels.com/collections/all?filter.p.m.my_fields.color=Brown
So, when the filter value = Brown, I want to show “Brown shoelaces text”. When the filter value = Blue, it should show “Blue shoelaces text”.
I have tried the following:
{%- for filter in collection.filters -%}
{% if filter_value.label == 'Blue' %}
<h2 style=text-align:center">Blue shoelaces</h2>
{% elsif filter_value.label == 'Brown' %}
<h2 style=text-align:center">Brown shoelaces</h2>
{% endif %}
{% endfor %}
I tried the same with “filter.active_values”, “filter.values” and even with “page.url” contains = Blue but all of that doesn’t work.
I’d appreciate some help.