Shopify themes, liquid, logos, and UX
Hi everyone,
I would like my logo in the top left corner of my website to change color every time I refresh the page, but only on the collection page.
Could anyone guide me on how to achieve this? I’d really appreciate your help!
Thanks so much in advance! 😊
website : https://www.alfjewelry.com/
password: andrew03
Hi @thomas93410 ,
Given that your logo is already in black, it is not feasible to alter the color of the individual strokes within it.
In case you want to change the background, you can use this code here:
% if template.name == "collection" %}
{% style %}
a.logo-link.w-inline-block {
background: green;
}
{% endstyle %}
{% endif %}
Here is the result: https://prnt.sc/AFKrXoVjZZSJ
Please add this code into your theme.liquid, before the <head> tag.
Please let me know if it works!
Best,
Daisy
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025