Shopify themes, liquid, logos, and UX
Hello, so i want to change the header color to white but only on the home page (all other pages should have a black header color aswell as a black logo). How can i do that?
i have some images of how it is right now linked below:
Hello @Carlzito,
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file theme.liquid
Step 3: Paste the below code at the bottom of the file -> Save
<style>
{% if template == 'index' %}
.header {
background-color: white;
}
{% else %}
.header {
background-color: black;
}
{% endif %}
</style>
Thanks!
That just made it look like this
You want to header like this on other pages? @Carlzito
no white and se through on home page
Hey @Carlzito,
Can you share the link to your store please? Thanks!
This is Noah from PageFly - Shopify Page Builder App
I can help you. Please can you provide the website url. Thank you.
Best regards,
Noah | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Sent the link higher up in the thread.
Hello @Carlzito,
Please share the store URL (storefront password if your store is password protected) so that I can check and provide you with a possible solution.
Thank you
Link is higher up in thread
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025