How to Change Breadcrumb Colors Based on Active Collection

Solved

How to Change Breadcrumb Colors Based on Active Collection

MudassirMehmood
Excursionist
37 1 6

Hi everyone,

I need some assistance with styling the breadcrumbs in my Shopify store. Specifically, I’d like the active breadcrumb (the current collection or product) to appear in black (#000000), while all the other non-active breadcrumbs should appear in a lighter color (#eae9e7).

For example, in the following breadcrumb trail:

Home / Appliances / Kitchen Appliances / Hand Mixer

When viewing the Hand Mixer product, I want "Hand Mixer" to be styled in black, while "Home", "Appliances", and "Kitchen Appliances" should all be displayed in #eae9e7.

Has anyone implemented this type of styling, or does anyone know the best approach to achieve this?

Thanks in advance for your help!

like this Active collection color bright
and other are light

WhatsApp Image 2024-10-17 at 10.37.54 AM.jpeg



MudassirMehmood
Accepted Solutions (5)

nidhidhiman004
Shopify Partner
88 6 8

This is an accepted solution.

hi @MudassirMehmood 

please add this code

breadcrumb .active {
color: "#000 (Add color code here)"
}

theme.css or base .css

It will work in theme.liquid also by adding style tag

 

please mark it as a acceptable solution if it really helpful you

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me - nidhidhiman004@gmail.com Skype: live:.cid.4caf71e25fc2bb1e, Email me -rahul@prowebcoder.com - Skype: live:dhiman.639

View solution in original post

Dan-From-Ryviu
Shopify Partner
11754 2306 2488

This is an accepted solution.

Please add this code to Custom CSS in Online Store > Themes > Customize > Theme settings 

a.breadcrumbs_link {
color: #eae9e7;
}
.breadcrumbs__item { color: #000; }

Screenshot 2024-10-17 at 14.02.52.png

- Helpful? Like & Accept solution! - Support me: Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

View solution in original post

EBOOST
Shopify Partner
1399 351 432

This is an accepted solution.

Hi @MudassirMehmood ,

May I suggest to update code these steps:

1. Go to Store Online-> theme -> edit code
2. Assets/base.css
3. Add code below to end of file

.breadcrumbs__list li:after, 
.breadcrumbs__list li > * {
  color: #eae9e7;
}

.breadcrumbs__list li:last-child > * {
  color: #000;
}
- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free. Github.com/eboost10
- ❤❤DONATE ❤❤Coffee tips

View solution in original post

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

@MudassirMehmood,

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head>

<style>
.breadcrumbs__list .breadcrumbs_item,
.breadcrumbs__list .breadcrumbs_link {
   color: #eae9e7!important
}
.breadcrumbs__list .breadcrumbs__item {
   color: #000000!important
}
</style>

Result:

BSSCommerceB2B_0-1729148868230.png

If it helps you, please like and mark it as the solution.

Best Regards 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

@MudassirMehmood, change the previous code like this 

<style>
.breadcrumbs__list .breadcrumbs_item,
.breadcrumbs__list .breadcrumbs_link {
   color: #74767c!important
}
.breadcrumbs__list .breadcrumbs__item,
.breadcrumbs__list .breadcrumbs_item:hover,
.breadcrumbs__list .breadcrumbs_link:hover {
   color: #000000!important
}
</style>

Result:

BSSCommerceB2B_0-1729157331958.png

Hope it helps you 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 14 (14)

nidhidhiman004
Shopify Partner
88 6 8

This is an accepted solution.

hi @MudassirMehmood 

please add this code

breadcrumb .active {
color: "#000 (Add color code here)"
}

theme.css or base .css

It will work in theme.liquid also by adding style tag

 

please mark it as a acceptable solution if it really helpful you

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me - nidhidhiman004@gmail.com Skype: live:.cid.4caf71e25fc2bb1e, Email me -rahul@prowebcoder.com - Skype: live:dhiman.639

Dan-From-Ryviu
Shopify Partner
11754 2306 2488

Could you share your store link so I can check?

- Helpful? Like & Accept solution! - Support me: Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

MudassirMehmood
Excursionist
37 1 6
Dan-From-Ryviu
Shopify Partner
11754 2306 2488

This is an accepted solution.

Please add this code to Custom CSS in Online Store > Themes > Customize > Theme settings 

a.breadcrumbs_link {
color: #eae9e7;
}
.breadcrumbs__item { color: #000; }

Screenshot 2024-10-17 at 14.02.52.png

- Helpful? Like & Accept solution! - Support me: Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

MudassirMehmood
Excursionist
37 1 6

EBOOST
Shopify Partner
1399 351 432

This is an accepted solution.

Hi @MudassirMehmood ,

May I suggest to update code these steps:

1. Go to Store Online-> theme -> edit code
2. Assets/base.css
3. Add code below to end of file

.breadcrumbs__list li:after, 
.breadcrumbs__list li > * {
  color: #eae9e7;
}

.breadcrumbs__list li:last-child > * {
  color: #000;
}
- Hope can help. If you find my reply helpful, please hit Like and Mark as Solution
- Need a Shopify developer? Contact email: eboost10@gmail.com
- Visit our site: https://www.eboosttech.net to view and download shopify themes and magento2 extensions free. Github.com/eboost10
- ❤❤DONATE ❤❤Coffee tips
MudassirMehmood
Excursionist
37 1 6

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

@MudassirMehmood,

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head>

<style>
.breadcrumbs__list .breadcrumbs_item,
.breadcrumbs__list .breadcrumbs_link {
   color: #eae9e7!important
}
.breadcrumbs__list .breadcrumbs__item {
   color: #000000!important
}
</style>

Result:

BSSCommerceB2B_0-1729148868230.png

If it helps you, please like and mark it as the solution.

Best Regards 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

MudassirMehmood
Excursionist
37 1 6

When the breadcrumb link hovers only the text-decoration changes color to black but I want both text-decoration and text.  Change color to black on hover

MudassirMehmood
BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

@MudassirMehmood, change the previous code like this 

<style>
.breadcrumbs__list .breadcrumbs_item,
.breadcrumbs__list .breadcrumbs_link {
   color: #74767c!important
}
.breadcrumbs__list .breadcrumbs__item,
.breadcrumbs__list .breadcrumbs_item:hover,
.breadcrumbs__list .breadcrumbs_link:hover {
   color: #000000!important
}
</style>

Result:

BSSCommerceB2B_0-1729157331958.png

Hope it helps you 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

MudassirMehmood
Excursionist
37 1 6

Please bother short this style code with same working

<style>
li.breadcrumbs_item {
display: inline-block !important;
}
li.breadcrumbs_item:not(:last-child):after {
content: '';
display: inline-block !important;
margin: 0 .20em !important;
position: relative !important;
vertical-align: middle !important;
border-style: solid !important;
border-width: .10em .10em 0 0 !important;
height: .30em !important;
width: .30em !important;
transform: rotate(45deg) !important;
top: -0.1em !important;
margin-left: 5px !important;
margin-right: 8px !important;
}
.breadcrumbs__item:not(:last-child):after {
{% if section.settings.separator_shape == 'slash' %}
content: '/';
margin-left: 1.0em;
{% endif %}
}


.breadcrumbs__list .breadcrumbs_item,
.breadcrumbs__list .breadcrumbs_link {
color: #74767c!important
}
.breadcrumbs__list .breadcrumbs__item,
.breadcrumbs__list .breadcrumbs_item:hover,
.breadcrumbs__list .breadcrumbs_link:hover {
color: #000000!important
}
.breadcrumbs__list {
list-style-type: none;
margin: 5px;
padding: 0;
font-size: 15px;
}
.breadcrumbs_link:hover {
text-decoration: underline;
text-color: #000000;
text-underline-offset: 0.3rem;
text-decoration-color: #000000;
}
@media (min-width: 1025px) {
.page-width {
max-width: 1600px;
padding-left: 15px;
padding-right: 15px;
margin-left: auto;
margin-right: auto;
}
}
.breadcrumbs {
padding-top: 15px;
padding-bottom: 15px;
}
.breadcrumbs__list {
list-style-type: none;
margin: 5px;
padding: 0;
font-size: 15px;
}
.breadcrumbs__item {
display: inline-block;
}
.breadcrumbs_link {
cursor: pointer;
display: inline-block;
border: none;
box-shadow: none;
text-decoration: none;
text-underline-offset: 0.3rem;
color: #000000;
/font-size: 1.4rem;/
font-family: inherit;
}
#breadcrumbs-divider {
display: block;
height: 1px;
background-color: #eae9e7;
}
</style>

MudassirMehmood
BSSCommerce-B2B
Shopify Partner
1972 564 568

You can't reduce the code because it can't be shorter. If you see it's too long in your theme.liquid file please add it to the end of base.css file

li.breadcrumbs_item {
display: inline-block !important;
}
li.breadcrumbs_item:not(:last-child):after {
content: '';
display: inline-block !important;
margin: 0 .20em !important;
position: relative !important;
vertical-align: middle !important;
border-style: solid !important;
border-width: .10em .10em 0 0 !important;
height: .30em !important;
width: .30em !important;
transform: rotate(45deg) !important;
top: -0.1em !important;
margin-left: 5px !important;
margin-right: 8px !important;
}
.breadcrumbs__list .breadcrumbs_item,
.breadcrumbs__list .breadcrumbs_link {
color: #74767c!important
}
.breadcrumbs__list .breadcrumbs__item,
.breadcrumbs__list .breadcrumbs_item:hover,
.breadcrumbs__list .breadcrumbs_link:hover {
color: #000000!important
}
.breadcrumbs_link:hover {
text-decoration: underline;
text-color: #000000;
text-underline-offset: 0.3rem;
text-decoration-color: #000000;
}
@media (min-width: 1025px) {
.page-width {
max-width: 1600px;
padding-left: 15px;
padding-right: 15px;
margin-left: auto;
margin-right: auto;
}
}
.breadcrumbs {
padding-top: 15px;
padding-bottom: 15px;
}
.breadcrumbs__list {
list-style-type: none;
margin: 5px;
padding: 0;
font-size: 15px;
}
.breadcrumbs__item {
display: inline-block;
}
.breadcrumbs_link {
cursor: pointer;
display: inline-block;
border: none;
box-shadow: none;
text-decoration: none;
text-underline-offset: 0.3rem;
color: #000000;
font-family: inherit;
}
#breadcrumbs-divider {
display: block;
height: 1px;
background-color: #eae9e7;
}

And remain this one in theme.liquid

<style>
.breadcrumbs__item:not(:last-child):after {
{% if section.settings.separator_shape == 'slash' %}
content: '/';
margin-left: 1.0em;
{% endif %}
}
</style>

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

MudassirMehmood
Excursionist
37 1 6

In mobile when we refresh the page or go to the child category from the parent 
breadcrumbs show from 
Home > Appliances > Vacuums, Steamers & Floor Care > Robot Vacuums
Due to this on mobile after refreshing it hide  Active category
But i want that after refreshing i may hide Home > Appliances (Parent Category)
not the Robot Vacuums (Active Category)

Default After refreshing the page

WhatsApp Image 2024-10-17 at 2.49.45 PM (2).jpeg


But I want to show Breadcrumbs show like this. I mean don't hide active category on refreshing
I want to show like this on refreshing

WhatsApp Image 2024-10-17 at 2.49.45 PM.jpeg



MudassirMehmood