Changing header color on one page only

Carlzito
New Member
7 0 0

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:

Carlzito_0-1715539097712.png

Skærmbillede 2024-05-12 kl. 20.38.28.png

 

Replies 10 (10)

thirtycoders
Shopify Partner
108 19 24

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!

Thirtycoders || Shopify Partner
Found my response useful? Show your appreciation with a Like!
Did your query get resolved? Mark it as an Accepted Solution.
For additional discussions, reach out via: Email ID: thirtycoders@gmail.com
Carlzito
New Member
7 0 0

That just made it look like thisSkærmbillede 2024-05-15 kl. 11.05.09.png

thirtycoders
Shopify Partner
108 19 24

You want to header like this on other pages? @Carlzito 

thirtycoders_1-1715794539233.png

 

thirtycoders_0-1715794490709.png

 

Thirtycoders || Shopify Partner
Found my response useful? Show your appreciation with a Like!
Did your query get resolved? Mark it as an Accepted Solution.
For additional discussions, reach out via: Email ID: thirtycoders@gmail.com
Carlzito
New Member
7 0 0

no white and se through on home page

ThePrimeWeb
Shopify Partner
2077 596 467

Hey @Carlzito,

 

Can you share the link to your store please? Thanks!

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
Carlzito
New Member
7 0 0

PageFly-Noah
Astronaut
1119 201 220

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.

Carlzito
New Member
7 0 0

Sent the link higher up in the thread.

EFOLI-Emilia7
Shopify Partner
316 10 38

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

Emilia7 | eFoli
-Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Checkout our apps:Inkybay || MultiVariants
Carlzito
New Member
7 0 0

Link is higher up in thread