Custom Badge change of color and position

Hello all,

After checking various tutorial I managed to add a “bundle” badge on the collections page using the following code on card.product.liquid

{% if card_product.tags contains ‘Bundle’ %}
Bundle
{% endif %}

then I tried to change the color with the following code on component-card.css

.badge__Bundle {
background-color: #ff87bd;
color: #fff;
}

And of course I tried to move it to the right side without success.

www.hintofhappiness.com

Any input is highly appreciated !

Karla

Hey @Karla8

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

that was incredible fast. I’ve been trying for the last few hours haha. thank you so much !

Thank you for your reply. I’m glad to hear that the solution worked well for you. If you require any more help, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.