Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello, I have already a unique collection description for each of my collections (80+) and i would like to also add a few sentences or maybe a paragraph below the main description according to the tag used in the collection url (the tag just sort out my products in this specific collection).
So, it would be like this :
If my collection is "https://ilikeshoes/collections/sandals" and the tag in use is red "https://ilikeshoes/collections/sandals?constraint=red"
There will be the main description (the one written in the rich text editor) : This collection lists all our sandals, find the ones you like among 50 references.
+ the dynamic description according to the tag red : Red is the color of power, passion, and violence.
Thank you for your help 😉
Solved! Go to the solution
This is an accepted solution.
Hi @LucasMondon,
Please go to collection-template.liquid file and add code:
{% if current_tags contains 'red' %}
Red is the color of power, passion, and violence.
{% elsif current_tags contains 'blue' %}
Blue is ....
{% endif %}
Hope it helps!
This is an accepted solution.
Hi @LucasMondon,
Please go to collection-template.liquid file and add code:
{% if current_tags contains 'red' %}
Red is the color of power, passion, and violence.
{% elsif current_tags contains 'blue' %}
Blue is ....
{% endif %}
Hope it helps!
thank you, it works, but do you think I can use the same code for adding meta titles to theses “tagged” collections pages ?
Hi @LucasMondon,
Yes, it is entirely possible.
If you have any further questions, you can contact me.
Happy to help you.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024