Change Font Color of Header

Topic summary

A user wants to change their Shopify header font color from black to white, but only on the homepage/landing page, while keeping it black on all other pages.

Solution provided:

  • Navigate to Shopify Admin β†’ Online Store β†’ Themes β†’ Actions β†’ Edit Code
  • Locate Layout β†’ theme.liquid file
  • Add custom CSS code at the bottom that targets only the index/homepage template
  • Use conditional logic to apply white font color exclusively to the main page

Status: The solution was successfully implemented and resolved the issue. The user confirmed it worked as intended.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

Hi,

i want to change the Font Color of my Header but only on the Page when you enter my Website. At the moment its Black but i want it to be white. When i change it in Shopify the Color of the Header changes on every Site. I really only want it to be white on the Main Page.

URL: sixdreamz.com

1 Like

Hi @sixdreamz ,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Layout > theme.liquid and paste this at the bottom of the file:
{% if template == 'index' %}
    
{% endif %}

Hi @sixdreamz

Thank you for your response. It’s good to know that it’s worked for you. Kindly feel free to get back to me if you need any further assistance.
If helpful then please Like and Accept Solution.