Solved

Change Header Color on Specific Pages - Dawn Theme

bradrlyons
Visitor
3 0 0

I have a site with a wholesale side and a consumer side. For the wholesale pages, I use an if statement in the header.liquid file to replace the main menu with a wholesale menu. Is there a way to do something similar to change the background color of the header for just those pages?

Accepted Solution (1)

gr_trading
Shopify Partner
1822 143 189

This is an accepted solution.

@bradrlyons 

 

As you already doing this you can add a class name to <header> tag and create a class that will have the background color.

 

<style>
header.wholesaleheader{background:red}
</style>

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

View solution in original post

Replies 3 (3)

gr_trading
Shopify Partner
1822 143 189

This is an accepted solution.

@bradrlyons 

 

As you already doing this you can add a class name to <header> tag and create a class that will have the background color.

 

<style>
header.wholesaleheader{background:red}
</style>

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
bradrlyons
Visitor
3 0 0

But how do I call that class out with the if statement?

gr_trading
Shopify Partner
1822 143 189

plz share the URL and if statement you used to change the menu.

 

or you can refer to the below video which creates the template when you want a different header.

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee