All things Shopify and commerce
Hi!
I would like to change color of header of our collection page from Pink to White. Any help would be appreciated!
URL: https://bonebox.fi/collections/hannanheiluttavat-koiran-lelut
Screenshot: Attached
Solved! Go to the solution
This is an accepted solution.
yes, you can do that by adding the below code in your theme.liquid file before end body tag </body>
<script>
document.addEventListener("DOMContentLoaded", function()
{
var targetUrl = "https://bonebox.fi/collections/hannanheiluttavat-koiran-lelut";
if (window.location.href === targetUrl) {
var headerWrapper = document.querySelector(".header-wrapper");
if (headerWrapper) {
headerWrapper.style.background = "#ffffff";
}}
}
);
</script>
Go to your online store > Customize > Settings > Custom css
and paste this code in cutom css section
Hmm. Didn't seem to work 😕
Try this
hi thanks for this answer, for me its currently changing the header color for every page. is there a way to have it only change the header color of a specific page?? thanks again for the help
This is an accepted solution.
yes, you can do that by adding the below code in your theme.liquid file before end body tag </body>
<script>
document.addEventListener("DOMContentLoaded", function()
{
var targetUrl = "https://bonebox.fi/collections/hannanheiluttavat-koiran-lelut";
if (window.location.href === targetUrl) {
var headerWrapper = document.querySelector(".header-wrapper");
if (headerWrapper) {
headerWrapper.style.background = "#ffffff";
}}
}
);
</script>
User | RANK |
---|---|
50 | |
47 | |
39 | |
28 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023