Change menu and logo colour in header for homepage and rest of the site (Dawn theme)

Hey, I’ve been building my site for a while now and I want to have my menu and logo in white for my homepage (as I have an image banner) but on my other pages I would like the menu and logo black.

I’ve changed it to white now, but obviously on all the other pages it doesn’t show up as the background colour is white also.

There’s also a bit of a difficulty factor in it, as my header is transparent, not sure if this will alter anything. (I’ve made the header tranparent by using a custom code I found on these threads to enable transparent header.

1 Like

Hi @NoraPinpiri

If your header color black on default and you change it on the homepage by white color. Check this.

{% if template == 'index' %}

{% endif %}

And Paste it on the theme.liquid.

Hey @NoraPinpiri

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.

Best Regards,
Moeed

Hey @Moeed

yeah sure, I got a temporary link for now that I will change eventually, but here’s the link: https://976d80-d2.myshopify.com/

Hey @NoraPinpiri

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag

{% if template.name != "index" %} 

{% endif %}

RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

3 Likes

Thanks @Moeed , it solved my problem thank you very much!

Thank you for your reply. I’m glad to hear that the solution worked well for you. If you require any more help, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

This doesn’t work.