How do I add a search box to my announcement bar?

How do I add a search box to my announcement bar?

or how can i add one as a section on my homepage?

Hi @crowshead
To include a search function in the announcement bar,

You need to render the search section in the announcement-bar.liquid file.

If you’re using basic Shopify themes like Dawn, Refresh, or Prestige, this method should work.

Navigate to Edit Code, then search for announcement-bar.liquid file.

In that around line 141 the is a section ‘

’.

Just above this, add

‘{% render ‘header-search’, input_id: ‘Search-In-Modal’ %}’

Save your changes, and you’re all set

Hope to have helped you
BR

Dawood Mirza

is there a way to have the search box open so they can just type into the
box without having to click on the magnifying glass?