SO LOST! How to add search search bar in the header?

Hi there. I’m trying to add the search bar back to the header on my webpage. I’ve played around with different codes and placements, but haven’t succeeded yet. I don’t understand exactly WHERE and WHAT CODE in need to insert.

Thanks so much in advance! xx

https://powdercandleaustralia.com.au/

Hi @gerlikask ,

For Adding search in The header you need to add following code:

Create one snippet: SALES CHANNELS > Online Store > Themes > Actions > Edit code > Snippet > search-bar.liquid and include below code in search-bar.liquid snippet


Next you need to include this snippet in header file: SALES CHANNELS > Online Store > Themes > Actions > Edit code > Sections > header.liquid and include search-bar snippet above cart button code:

{% include 'search-bar' %}

Thank you.

Thank you! This brings me to my second question. How can I add cart button into the header? I removed that a while back, and can’t get it back now