Shopify themes, liquid, logos, and UX
I need some help adding custom badges to product items in the Empire template. They would ideally be based on tags. I tried adding the tag:__label:Best Seller but had no results. Any help would be appreciated.
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
@Kimjik there are a couple steps to do this:
1. Add the tag to the customer
2. Upload the badge to the Assets folder
3. Add the theme code to show the badge where you want
An example for #3, say you want to add the badge to the product cards in collection pages, you would start with the Templates/collection.liquid file in your theme editor and read the code there to see the files included. Then read each file to find the snippet that shows your product cards (it's usually something like Snippets/product-card.liquid or product-grid.liquid).
Once you've identified the file where the code is, you can add an image tag with the badge, something like:
{% if product.tags contains "Best Seller" %}
<img src="{{ "badge-best-seller.png" | asset_img_url: "100px" }} class="collection-badge" />
{% endif %}
Then of course you'd style the CSS for the .collection-badge class to have it show how you'd like.
Do the edits on a duplicate theme so you don't affect your live theme - this guide will help with that + identifying elements to edit the CSS: https://speedboostr.com/how-to-safely-edit-your-shopify-theme.
If you get stuck or prefer to hire a professional Shopify developer, feel free to contact my team at speedboostr.com/contact.
Good luck.
I created a tutorial for this, not specifically tailored to the Ride theme, but you may find it helpful: https://youtu.be/0OjLBnyTyus?si=DxZODP2buUg0cUcc
Anyone looking for adding a badge or label in 2024, you can check this video out. I hope it helps.
Hi @Kimjik ,
Please refer the below video to enable multiple badges on product card.
Hope this will help others too.
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024