i made a mistake

Solved
aimeemorash7
Tourist
12 0 1

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

Accepted Solution (1)
Moira
Shopify Staff
Shopify Staff
1793 204 274

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

21-10-4f7cd-5bw8x

  • Click the drop-down menu to select an older version. Clicking a date stamp will roll the code back to that saved version. If you remember when you made the changes, you can return to the state of the file before your changes.

21-10-3umra-1c9af

  • If you remember when you made the changes, you can return to the state of the file before your changes. Finally, don't forget to hit that green save button!

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!

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

View solution in original post

Reply 1 (1)
Moira
Shopify Staff
Shopify Staff
1793 204 274

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

21-10-4f7cd-5bw8x

  • Click the drop-down menu to select an older version. Clicking a date stamp will roll the code back to that saved version. If you remember when you made the changes, you can return to the state of the file before your changes.

21-10-3umra-1c9af

  • If you remember when you made the changes, you can return to the state of the file before your changes. Finally, don't forget to hit that green save button!

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!

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