Solving the Shopify Search Page Mystery: Why 'No Products Found' Still Shows '3 Items'
Hey everyone! As a Shopify expert who spends a lot of time diving into what makes your stores tick (and sometimes, what makes them scratch their heads!), I love seeing the community come together to solve tricky problems. Recently, a thread popped up that really resonated, addressing one of those subtle but annoying quirks that can impact your customer's experience: the mysterious case of the search page showing '3 items' when clearly, no products are actually visible.
Our fellow store owner, kevalt, kicked off the discussion with a clear example: they'd search for something like 'about us' – obviously not a product – and while the page correctly said 'No products found,' it still displayed '3 items' right near the sort/filter section. Talk about confusing! It's like the store is winking at your customers, saying, 'There's something here, just not what you're looking for... or what I'm showing you!'
Understanding the Root Cause: Shopify's Default Search Logic
Several community members, including PieLab and AnneLuo, quickly diagnosed the culprit. It boils down to how Shopify's default search operates and how your theme interprets those results. Essentially, Shopify's search is designed to be comprehensive. When you type something into the search bar, it's looking across all sorts of content: your products, yes, but also your static pages (like 'About Us' or 'Contact'), and even your blog posts. The search.results_count variable, which many themes use to display the total number of items found, is counting all of these resources.
The hiccup happens when your theme's search results template (often found in files like main-search.liquid or search.liquid) is designed to only display products. So, even though Shopify's backend found your 'About Us' page, your 'Contact' page, and maybe a blog post about your company history, your theme's code is set up to filter those out visually, showing only products. AnneLuo put it perfectly: 'Shopify search is still finding pages/articles, Horizon only renders products, the result counter is not filtered accordingly. Therefore “3 items” appears even though no products are shown.' Tim_1 chimed in, noting that this often happens if a theme was modified to filter results in Liquid, meaning the code skipped those non-product results, leading to the counter mismatch.
So, what can we do about it? The community offered a few excellent paths, ranging from super simple to a bit more hands-on with code.
Solution 1: The 'Search & Discovery' App – A Game Changer!
This was the golden nugget discovered by kevalt themselves, and honestly, it's often the easiest and most overlooked solution for store owners who aren't comfortable digging into code. kevalt shared: 'I just go to “Search & Discovery” app and I uncheck below box.' This refers to a setting within Shopify's own free 'Search & Discovery' app. By unchecking the option to include pages or blog posts in your search results, you tell Shopify to only search products (or whatever you specify) from the get-go. This means search.results_count will then accurately reflect only what your theme intends to display.
Here’s how kevalt showed it, and it's super straightforward:
And the happy result:
Solution 2: Check Your Theme Settings
PieLab initially suggested checking your Theme Editor for an option to limit search results to 'Products only.' This is always a great first step before diving into code. Many modern Shopify themes offer more control through the customizer, so take a peek under your search settings to see if there's a toggle for what content types are included in search results.
Solution 3: Diving into the Code (for the Brave!)
If the 'Search & Discovery' app isn't quite cutting it, or you prefer a code-based approach, the community had a few solid suggestions for modifying your Liquid files. Remember to always duplicate your theme before making any code changes!
Option A: Filtering the Search Form Input
topnewyork offered a clean way to tell the search form itself to only look for products by adding a hidden input field. This is a powerful method because it filters the results at the source, before the search.results_count is even generated.
Here’s what they recommended:
- Go to Online Store > Themes > Actions > Edit Code.
- In the
Sectionsfolder, find yourmain-search.liquidfile (or similar, depending on your theme). - Locate the main search form's input field (often a text input where users type their query). After this line, paste the following:
- Next, in the
Snippetsfolder, find yourheader-search.liquidfile (this often controls the search bar in your header or a pop-up search). - After the input tag there, paste the same line:
This tells the search mechanism, 'Hey, when someone searches, just give me products, okay?'
Option B: Adjusting the Counter Logic
Khanh-Linh2 brought up another code-based solution, focusing on making the counter itself smarter. This approach modifies how search.results_count is calculated on the display side, ensuring it only counts actual products being rendered by the template. While they mentioned asking AI for this, it's a valid Liquid filtering technique.
They suggested:
- In Online Store > Themes > Actions > Edit Code, find your
search.liquidfile. - Look for
{{ search.results_count }}. - Replace it with:
{{ search.results | where: "object_type", "product" | size }}
This Liquid filter where: "object_type", "product" specifically tells Shopify to count only the results that are products, aligning the counter with what your theme is actually showing. Keep in mind that file names like search.liquid can vary slightly between themes (e.g., main-search.liquid, template-search.liquid), so you might need to do a little digging.
Making Your Search Results Crystal Clear
Ultimately, this discussion highlights how important it is for your store's search functionality to be intuitive and accurate. Confused customers are often lost sales. Whether you go with the simple app solution, a theme setting tweak, or dive into the code, ensuring your search results counter reflects only what you're showing (usually products) is a small change that makes a big difference in user experience.
PieLab also threw in a great tip for making your actual products stand out more: using clear badges. Apps like Deco Product Labels can help highlight your items effectively, which is a smart move once you've sorted out the underlying search logic. It's all about making it as easy as possible for your customers to find what they're looking for, without any confusing 'phantom items' popping up!
I hope this deep dive into a common community question helps you refine your Shopify store's search experience. Happy selling!

