I’m running empire theme and have certain products and collections assigned to their own templates. I want those templates to display a different logo and header/navigation menu color than the “default” templates. I was able to figure out the code to change the logo in those templates but not the colors. Can anyone assist?
Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.
Depends on how many templates you have.
If not many, then one option is to add a “Custom liquid” / “Custom code” section to those templates in template area and paste code like:
This worked also for the nav bar but not the header (where the logo is located). It seems the header is controlled by another set of code but I can’t figure out where.
The point of using a section in Template area vs editing theme code is that code in “Custom liquid” section will only apply to the pages using this particular template while theme code edit applies to all pages, so need some conditionals.
However, Footer group is the same for all templates*
Adding a “Custom liquid” section to the Footer group is ultimately the same as pasting the code into layouts/theme.liquid, but better because it does not make theme version updates difficult.
if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it