Marketing | Creative | Strategy

Your faithful partner in the discovery of endless digital opportunity.

Take the First Step

Optimizing Search Results in Shopify For Developers

When a client is navigating through a Shopify store, speed is of utmost importance. The faster they can find the product they’re looking for, the more likely they are to end up with it in their shopping cart. 

Clients usually start hunting for a product by using the tried and true ‘search’ button on a storefront. But how can you, as a developer, get ahead of the client’s needs and optimize the search results for them? 

Keep reading - we’ve got a quick fix to help streamline and optimize search results on the development side! 

The Challenge

As a Shopify site is being built and copy is being developed, verbiage and product information is inevitably going to be repeated. This has the potential to make search results for visitors untargeted and confusing. Here’s an example: 

Imagine that a modern clothing company has a best-selling pair of pants that they refer to as ‘high waisted skinny jeans’. 

On their Shopify site, they have multiple pages, among them:

  • a ‘best sellers’ page
  • an array of blog content
  • a ‘collections’ page
  • a ‘sale items’ page

Across all of these pages, it’s likely that the term ‘high waisted skinny jeans’ is used numerous times. Therefore, when a customer heads to search for ‘high waisted skinny jeans’, the search results are going to be generic and not necessarily targeted to their shopping needs. 

In fact, depending on the Shopify theme that the site is utilizing, the results may be numerous and overwhelming, or only show results on certain pages and not offer enough search results at all.

The Fix

So what can you do if the Shopify theme that you bought automatically searches on all of your page types, but you want to reduce the results to show only product pages? 

Or what if you have the opposite problem, and your theme only searches product pages, but you want to add other pages types into the search results?

Good news! Choosing the page types that you want your search to return can be configured very simply, by using a hidden input item included in the search form. Here’s an example of what that hidden input could look like: 

<form action="/search" method="get" role="search" … >

                <input type="hidden" name="type" value="product,article,page,collection">


Using: value="product,article,page,collection" will ensure that the search form returns the results from all pages that contain the searched term.


Likewise, if you only want to return the results from product pages for example, you can replace the hidden input line with: <input type="hidden" name="type" value="product">



The ultimate goal for any developer should be to create a Shopify site that’s not just easy to navigate, but also optimized for potential customers’ needs. 

As you can see, changing just one line of code can return vastly different results. So follow the steps above to simplify your Shopify site, optimize your search results, and streamline your potential customers’ Shopify experience!


Get A Quote

Ready to take the next step? Please fill out the form below. We can't wait to hear from you!

Once submitted, a Slicedbread representative will be back in touch with you as soon as possible.

* Required Fields