Solved

Change Logo when switching to sticky header

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 6 (6)

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

bertoloo
Excursionist
22 0 6

Hi @danc1206 could you please share the code from your header?
I want a header like yours!I've been looking for someone for a while now who would have created a menu exactly like this. Can you help me?
Thank you in advance!

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.