How can I fix a deleted search icon code in Dawn Theme?

Hi,

I stupidly followed someone’s google advice on deleting the entire code for Dawn Theme’s search icon in the header. It now shows an error “Liquid error (sections/header line 296): Could not find asset snippets/header-search.liquid”. How do I fix this?

Thank you.

Hi @Lauri3

You can open file that you delete code, revert it to previous version

Hi,

Thank you for your response. I can not access the file as I deleted the whole file, and am unable to find ‘recent changes’ and revert it back.

Can I add in a new snippet? Is anyone able to provide the code for this?

Thank you

What’s the version of your Dawn theme?

You can download another Dawn theme and then copy the code of header-search.liquid in a new one.

Go to your current theme, Online store > Themes > Edit code > Snippets > create a new header-search.liquid file, paste code from new one to this file

Thank you so much, that worked perfectly.

Glad I could help