Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Recently I added code for a sticky header on my site which worked but it also cut off like 10% of my hero image at the top. I added a code to fix it but it cut off my hero image even more. I deleted it but its still like 50% cut off. See what I mean here: www.petbenefit.net. How do I fix this? I'm so stressed
Solved! Go to the solution
This is an accepted solution.
Hey @aimeemorash7!
Shopify knows that errors are just human nature, so we have provided a way to undo changes made to a code file in your theme over time. Rather than trying to re-implement your hero banner code, my first suggestion is to try rolling back your .liquid files individually to a time and date before you made the changes.
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
Click on one of the files under the relevant folder in which you want to undo changes.
Click Older versions next to the file name
Once you have rolled back your theme to its original state, we can then look at the correct code you would need to implement a sticky header without compromising other parts of your homepage.
TIP: We always suggest you first duplicate the theme and work in the duplicate. That way you can always go back to your previous version.
Otherwise, how is the rest of your website coming along? I had a good look around your store and wondered if you had ever thought about adding an About page? This will really personalize your business to your customers, it's awesome for them to know who you are and what your company is about. It will also improve your conversion rate which is a big opportunity to grow your business!
Here is where you can learn more about conversion rates
Here is where you can learn how to create an 'About Us' page
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
This is an accepted solution.
Hey @aimeemorash7!
Shopify knows that errors are just human nature, so we have provided a way to undo changes made to a code file in your theme over time. Rather than trying to re-implement your hero banner code, my first suggestion is to try rolling back your .liquid files individually to a time and date before you made the changes.
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
Click on one of the files under the relevant folder in which you want to undo changes.
Click Older versions next to the file name
Once you have rolled back your theme to its original state, we can then look at the correct code you would need to implement a sticky header without compromising other parts of your homepage.
TIP: We always suggest you first duplicate the theme and work in the duplicate. That way you can always go back to your previous version.
Otherwise, how is the rest of your website coming along? I had a good look around your store and wondered if you had ever thought about adding an About page? This will really personalize your business to your customers, it's awesome for them to know who you are and what your company is about. It will also improve your conversion rate which is a big opportunity to grow your business!
Here is where you can learn more about conversion rates
Here is where you can learn how to create an 'About Us' page
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
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