I need help with search feature

My shop has a search bar, i only want products to appear when searched and not pages. As you can see in this image different pages appear on the search and i dont want that. How do i make the search feature only apply to products?

SHOP URL: https://c1e46d.myshopify.com/collections/all

Please follow the steps below:

  • Step 1: Go to header.liquid file, find ‘routes.search_url’ and add code here:

  • Step 2: Go to main-search.liquid file, find ‘routes.search_url’ and add code here:

Code:

<input type="hidden" name="type" value="product">

Refer: https://shopify.dev/themes/navigation-search/search#the-search-form

Hope it helps!

Hey, @suoshie

I’m not formally trained in code to provide you with an exact solution to have a search bar this excludes all searchable parameters other than products in your store. However, I’m confident one of our Shopify experts would be able to accomplish this at a reasonable price.

If there is anything else I can help you with, please let me know.

i did those steps but it dosent work :disappointed_face: