How can I recover a deleted .liquid file for my website header?

How can I recover a deleted .liquid file for my website header?

plezoxm
Visitor
1 0 0

I accidentally deleted header .liquid file that also caused my header.liquid to not appear on website. I dont remember the name of that liquid file but I remember that i was just above the header.liquid file.

Where can I get the code and name of that file and add it back? Can someone help me?

Reply 1 (1)

Rio
Shopify Staff
294 20 47

Hi, @plezoxm

 

Rio here from the Shopify Community team. 

 

I understand that you don't remember the name of the liquid file, but you do remember that it was just above the header.liquid file.

 

To help you with this, I suggest downloading a fresh version of your theme and copying and pasting the section that you removed from the fresh theme to your current theme. This should help you to restore your header and get your website back up and running.

 

For the 

Hello again,

In addition, I'd like to suggest using the comment feature to hide code instead of deleting it. This can be a helpful practice to avoid accidentally deleting important code in the future.

 

To use the comment feature, you can simply add "{% comment %}" before the code you want to hide and "{% endcomment %}" after the code. This will hide the code from your website, but it will still be visible in your theme's code editor.

Rio | 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