Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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.