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! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey 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, 2024