Beautiful solution!! thank you!
Topic summary
Goal: add a prominent search bar as a reusable homepage section in Shopify’s Dawn theme.
Proposed method:
- Edit main-search.liquid and add a JSON schema “presets” entry so it can be added as a section via Customize.
Common issues and fixes:
- Liquid error: “Array ‘search.results’ is not paginateable/paginatable” when using the main-search section. Cause: the search template’s pagination logic isn’t valid inside a section. Workaround: use a “Custom Liquid” section with a simplified search code that removes pagination/facets; several users confirm this works.
- JSON save errors: usually a missing comma before the presets block.
- Adding the wrong section: some added “Search results” instead of “</> Custom Liquid.” Pasting the simplified code into “Custom Liquid” resolved errors.
Customization tips:
- Change heading/placeholder text via Online Store > Themes > … > Edit default theme content (translations).
- Remove the visible “Search” title by deleting the H1 block in the code.
- Alternatives: make the header search always visible (external tutorial) or add a faux input that triggers the header search on click.
Unresolved:
- One report of live search/indexing mismatch after importing ~800 products (preview OK, live not). No solution posted.
Status: No canonical fix for turning main-search into a stable section; reliable approach is a Custom Liquid section or header-based tweaks. Code snippets/screenshots are central.