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
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