Personalized checkout and custom promotions with Shopify Scripts
Hey everyone,
I want to change the textcolor of a header on a certain page, just the product page:
https://velvah.com/products/velvah-genesis (passcode: "VELVAH101", the Genesis product)
I want to set the color of the text on the header on that page to black and keep the other headers white.
Does anyone have any suggestions?
Thanks
Solved! Go to the solution
This is an accepted solution.
Hello @Velvah
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
{% if tempalte contains 'product' %}
<style>
.header {
background-color: #000 !important;
}
</style>
{% endif %}
It will work for the product page but as i can see your other page header not showing correct it's white without the text?
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Hey @Velvah
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
{% if template contains 'product' %}
<style>
sticky-header.header-wrapper.color-scheme-a80d9fd7-daea-45c6-a118-e8e33eeb2c21.gradient {
background: black !important;
}
</style>
{% endif %}
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Thanks a lot mate!
If you need any other help feel free to ask here.
Best Regards
Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.
This is an accepted solution.
Hello @Velvah
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>
{% if tempalte contains 'product' %}
<style>
.header {
background-color: #000 !important;
}
</style>
{% endif %}
It will work for the product page but as i can see your other page header not showing correct it's white without the text?
If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Amazing! I spent literally 2 hours trying to figure it out with chatgpt, and you two saved me so much pain. Thank you so much
You're Welcome @Velvah
If you need any other help feel free to ask here.
Best Regards
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