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
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025