What's your biggest current challenge? Have your say in Community Polls along the right column.

Change color logo when refreshing page

Change color logo when refreshing page

thomas93410
Tourist
9 0 4

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


Screenshot_147.png

Reply 1 (1)

DaisyVo
Shopify Partner
1078 138 152

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

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution