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.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024