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>
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024