FROM CACHE - en_header

{% if page.url == "/tag page" %} add custom meta description, Help Please.

New Member
2 0 0


I want to display custom meta description on some tag pages. (e.g. ) and I try to use a construction like:



{% if collection.handle == 'assessment-kit' and collection.tags contains 'Assessment-Kit-(Q)' %}
<meta name="description" content="Test meta description">
{% endif %}



This is not working Please someone can help me find the right solution? Thank you!

Replies 2 (2)
Shopify Partner
136 17 30

That looks like it should work if the collection has that tag/handle combo, but since the handle is checked why check the tag also? Maybe only check if collection exists and then the tag without the handle.

New Member
2 0 0

can you please, rewrite the code?