Change Logo when switching to sticky header

Solved
danc1206
Shopify Partner
4 0 1

Hi,

 

How would I change the logo within the header when it switches to a sticky header please?

 

Thanks,

 

Dan

Accepted Solution (1)
UmairA
Shopify Partner
1106 101 225

This is an accepted solution.

Hi @danc1206 ,

 

No theme comes with this functionality by default but you can achieve this with theme coding

 

> Open header.liquid (In Sections folder)

> Look for the <img tag that links to the logo

> Duplicate it and add a class e.g "show-sticky"

> Now you need to hide the first logo when the header becomes sticky and vice versa.

 

I might be able to give a code solution if you share your store URL. You can also contact me for professional help.

View solution in original post

Replies 5 (5)
UmairA
Shopify Partner
1106 101 225

This is an accepted solution.

Hi @danc1206 ,

 

No theme comes with this functionality by default but you can achieve this with theme coding

 

> Open header.liquid (In Sections folder)

> Look for the <img tag that links to the logo

> Duplicate it and add a class e.g "show-sticky"

> Now you need to hide the first logo when the header becomes sticky and vice versa.

 

I might be able to give a code solution if you share your store URL. You can also contact me for professional help.

danc1206
Shopify Partner
4 0 1

Hi,

 

Thank you for all your help. The store is still in progress but the URL is https://steffansjewellers.myshopify.com and the password is steffans.

 

Thanks,

 

Dan

danc1206
Shopify Partner
4 0 1

Could you help me with the code I need to insert please?

danc1206
Shopify Partner
4 0 1

There doesn't appear to be any img tag in the code of header.liquid

arivetere
Visitor
2 0 0

Hello! What was the code for this? I came looking for the same solution.