Shopify themes, liquid, logos, and UX
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?
Solved! Go to the solution
This is an accepted solution.
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...
This is an accepted solution.
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...
But how do I call that class out with the if statement?
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.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025