I want a different colour for the menu and the rest of the site

Topic summary

A user wants their logo and menu text to appear in white on the homepage, but black on all other pages of their Shopify clothing brand site.

Proposed Solutions:

  • Two respondents suggested adding conditional CSS code to the theme.liquid file
  • The code should be inserted after the <head> tag in Online Store > Themes > Edit code
  • The solution uses {% if template == 'index' %} to target only the homepage

Current Status:

  • The original poster tried the suggested code but reports it only changed the background to white, not the text color
  • The issue remains unresolved
  • They’re requesting corrected code that will properly change the text color
Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

Hello,
I’m in the process of creating a website for my clothing brand and I’d really like to have my logo and my text welcome menu in white and then on the other pages of my site in black. ( i have the dawn theme )

I can’t do it, if anyone has a solution please let me know.

Here is the link to my site ( in construction) :

https://albesutdios.myshopify.com/

thank you

1 Like

Please add this code to theme.liquid file, after in Online Store > Themes > Edit code

{% if template == 'index' %}

{% endif %}
1 Like

Hi @albestudios ,

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:

{% if template.name == 'index' %}
    
{% endif %}

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you :heart_eyes:

Hi thank you for your help,

but at the end it only change the background in white not the texte.

but someone give me a code who worked.

Thank you so much :heart:

1 Like