Shopify themes, liquid, logos, and UX
I have a transparent header on my homepage, with light color icons on it (#F3EBE0). on my other pages i have the light color as a background and i would like the icons to be in a darker shade of red (#721817). how can I adjust the colors to be different from the home page?
Thank you
hi @OlaDobson , can you give me your store website url.
SIMICART: Mobile App Builder |Ironwork Theme - Coming Soon | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
hey BSSCommerce, I have already founf the code that will fix it:
<script>
document.addEventListener('DOMContentLoaded', function() {
const icons = document.querySelectorAll('.icon');
const homepageColor = '#F3EBE0';
const otherPagesColor = '#721817';
if (window.location.pathname === '/') {
icons.forEach(icon => {
icon.style.color = homepageColor;
});
} else {
icons.forEach(icon => {
icon.style.color = otherPagesColor;
});
}
});
</script>
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025