How can I add specific badges to certain products?

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.


              {% for tag in product.tags %}
                {% if tag contains 'badge' %}
                  {% assign final_tag = tag | remove: 'badge_' %}
                    {{ final_tag }}
                  {% endif %}
              {% endfor %}
            

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…

Hi, I need help on this. I cant seem to find the card-product.liquid. and main-product.liquid on my theme, I’m using horizon theme. Is it because of the theme is new, or updated theme by shopify

Yes, it’s absolutely possible to have “Sold Out” and “Out of Season” badges displayed only on specific products — even without using BSS: Product Labels & Badges.

If the app doesn’t allow granular control, you can add these badges through custom metafields and conditional logic directly in your theme code (for example, in product-card.liquid or main-product.liquid).
Basically, you’d:

  1. Create a metafield (e.g., “badge_status”) in Shopify for products.

  2. Assign values like sold_out or out_of_season to the products you want.

  3. Add a small Liquid condition to your theme files that shows the right badge only when that metafield matches.

Here’s a short reference guide from Shopify you can check out:
:link: https://help.shopify.com/en/manual/custom-data/metafields

If you’d like, I can also help you set this up step-by-step or write the exact Liquid snippet for your theme. Do you know which theme your store is currently using (e.g., Dawn, Prestige, etc.)?