How to change the color scheme of individual pages?

Topic summary

A user needed to change the color scheme of all pages except the homepage and product pages to white background with black text.

Solution provided:

  • Navigate to Shopify Admin → Online Store → Theme → Edit code
  • Locate the theme.liquid file
  • Insert custom CSS code above the </head> tag using Liquid template logic
  • The code uses conditional statements ({% unless template.name == 'index' or template.name == 'product' %}) to exclude homepage and product pages from the styling changes

Outcome:
The solution was successfully implemented and marked as resolved by the original poster.

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

How do I change the color scheme of all my pages apart from home/product page?

To background white, text black.

Url: https://errival.com/products/errival%E2%84%A2-instant-period-cramp-relief-heated-belt

Hi @Ryan1998 ,

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

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:

{% unless template.name == 'index' or template.name == 'product' %}
    
{% endunless %}

Here is result:

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:

1 Like

Great!! thank you :+1:

1 Like

@Ryan1998 No problem, Have a good day :heart_eyes:

1 Like