Shopify themes, liquid, logos, and UX
Hi, I would like to have two badges: sold out and out of the season. Do you know how I can do it? I already have tried the app BSS: Product Labels & Badges but I couldn't create a badge for only some products. Thank you in advance.
Hello @noemi2 ,
For creating badges for specific products you can use the product tags.
Follow below steps:
Add this code in "main-product.liquid" after the title and save it.
<div class="badge">
{% for tag in product.tags %}
{% if tag contains 'badge' %}
{% assign final_tag = tag | remove: 'badge_' %}
{{ final_tag }}
{% endif %}
{% endfor %}
</div>
Once you save the code then you need to go to the product where you want to add the badge.
Thanks,
Ritu
k you very much for your help @Ritu-25
I do not have any main-product.liquid. I have product.liquid, product-template.liquid, product-meta.liquid and product-item.liquid.
In product-meta.liquid is the only place where I found something related to the product title. See attached. Is the correct place?
Hey @noemi2 ,
Please add the code after title is showing.
If our code woudn't refelect there then i need to check which file is calling out there.
could you please let me know which theme you are using currently?
Thanks,
Ritu
Hi @noemi2 ,
Request you to refer the below video to implement the same.
Hope this will help...
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025