Changing Cart color on different Pages

Solved

Changing Cart color on different Pages

ReviveShop
Explorer
49 0 26

Hello guys, as you can see I have the cart icon in white, which is perfect for my home Site. But I need it in black everywhere else! Can anybody help me out?

https://luviera.store/

 

password: bautso

Accepted Solution (1)

Moeed
Shopify Partner
7347 1992 2430

This is an accepted solution.

Hey @ReviveShop 

 

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 </body> tag

{% if template.name != "index" %} 
<style>
#cart-icon-bubble svg path {
    fill: black !important;
}
</style>
{% endif %}

 

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

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

Replies 5 (5)

Moeed
Shopify Partner
7347 1992 2430

This is an accepted solution.

Hey @ReviveShop 

 

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 </body> tag

{% if template.name != "index" %} 
<style>
#cart-icon-bubble svg path {
    fill: black !important;
}
</style>
{% endif %}

 

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

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


ReviveShop
Explorer
49 0 26

Perfect! Thanks!

Moeed
Shopify Partner
7347 1992 2430

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.

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


topnewyork
Astronaut
1301 160 218

Hi @ReviveShop ,

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

 

 

{% if template.name != "index" %} 
<style>
#cart-icon-bubble svg path {
    fill: #000000 !important;
}
</style>
{% endif %}

 

 

If my reply is helpful, kindly click like and mark it as an accepted solution.

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month

PageFly-Amelia
Shopify Partner
626 165 238

This is Amelia from PageFly - Landing Page Builder App


I checked and saw that you added one custom CSS in the theme.liquid file that sets the color for the icon to be white. This will affect all the pages.
You can see this image

view-sourcehttpsluviera.store+2024-09-12+13-41-43.png

If you want to set the white color for only the homepage you need to add the liquid code that wraps your custom CSS code here.

 

{% if template.name == 'index' %}
<style>
  #cart-icon-bubble svg path {
     fill: #fff !important;
   }
</style>
{% endif %}

 

Hope that my solution works for you.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.