How can I adjust my shop's search bar to only find products?

Topic summary

A Shopify store owner wants to modify their search bar to return only product results, excluding pages. Currently, the search functionality displays both products and pages in results, which is not the desired behavior.

Proposed Solution:

  • For stores using the Dawn theme, edit code files in Online Store → Actions → Edit code
  • Modify header.liquid and main-search.liquid files
  • Add specific code snippets (shown in screenshots) to restrict search scope

Status: The issue has been ongoing for over a week. A support team member provided a code-based solution with visual instructions, but implementation confirmation is pending.

Summarized with AI on November 22. AI used: claude-sonnet-4-5-20250929.

I want my Shop search bar to only search for products and nothing else. As shown in the photo, my search bar searches both products and pages how do i make it only search for products? Please help ive been trying to do this for over a week.

shop url: https://c1e46d.myshopify.com/collections/all

Hi @suoshie

Greetings from the Store Watchers Support Team! Happy to help you today.

If you are using the dawn theme then the following code will help.

Go to Online Store → Actions → Edit code. Then find header.liquid and main-search.liquid

Add the following at the same place as showing in the screenshots


Let me know if need further assistance

Regards,
Store Watchers Support Team