As on my homepage I have added code for a transparent header.. So all my text and logos are in white with the banner video image showing as the background. which is what I want. But I would like a different header background colour on All the other pages Preferably (#c89c2b) without changing the homepage transparent background?
Hi @iannetelli
Are you familiar with codes? Would you mind to share your store URL? Thanks!
hi there, i am only familiar in the sense of step by step tutorials, i haven’t ever wrote code by hand
My url is www.iannetelli.com
Thanks for the info, chck this one to change the background color on other pages except homepage.
You can check this one.
From your Shopify admin dashboard, click on “Online Store” and then “Themes”
Find the theme that you want to edit and click on “Actions” and then “Edit code”.
In the “theme. Liquid” file. Find the tag and paste the code below before the tag.
{% unless template.name == 'index' %}
{% endunless %}
And Save.
result:
Hi @iannetelli
Please go to Online Store > Themes > Edit code > open theme.liquid file, after tag, add this code
{% if template == 'index' %}
{% else %}
{% endif %}
Result on homepage
Other pages
Hope this help!
Best regards,
Dan from Ryviu
Works perfectly thaankyou, just one more thing? how would I get the sticky header to change background colour but only on scroll? on the homepage?
What color do you want?
(#c89c2b) if thats possiable? if i wonted to change this would you be aable to show me where if that ok?
Please update your code
{% if template == 'index' %}
{% else %}
{% endif %}
I have little issue with this code. Please update again
{% if template == 'index' %}
{% else %}
{% endif %}
Hi Dan,
can you help me i have a similar issue, im using Nitro as my theme, in my homepage i have a transparent inline banner and i used white font works just fine but as i click shop or other pages, the wordings arent visible and i’d like to have a different color background for the inline banner in other pages please help me!



