Unlock Your Shopify Horizon Theme Search: Show Pages & Blogs on Results
Hey fellow store owners! Ever noticed something a little quirky with your Shopify store's search function, especially if you're rocking the Horizon theme? We recently had a great discussion pop up in the Shopify community that really hit home for a lot of folks. Our friend kevalt brought up a super common head-scratcher: why do pages and blog articles show up perfectly in the predictive search dropdown, but then vanish into thin air on the actual search results page?
It's a frustrating experience, right? You type something in, see the relevant page or blog post flash before your eyes, hit enter, and... poof! Only products. It makes you wonder if your content isn't being indexed, or if something's fundamentally broken. Good news: it's not broken, and your content is definitely indexed! It's actually a fascinating little nuance in how different Shopify themes are built, and the community really dug in to explain and solve it.
Why This Happens: The Tale of Two Searches
So, what's really going on here? The brilliant minds in our community, like AnneLuo and Sajini from Identixweb, quickly pinpointed the core issue. It boils down to a fundamental difference in how themes like Dawn and Horizon approach search.
Think of it this way: the Dawn theme is often designed for a more "site-wide search" experience. When you search on Dawn, it's typically set up to display products, pages, and blog articles all together on the main search results page. It's comprehensive.
The Horizon theme, however, often takes a more "product-focused search" approach. While its predictive search (that handy dropdown that appears as you type) is usually robust enough to pull in suggestions from products, pages, and blog articles, the full search results page (the one you land on after hitting enter, typically at /search) is often intentionally limited to showing only products. This isn't a Shopify platform limitation, mind you; it's a specific design choice within the Horizon theme's code.
As Sajini-Annie explained, the predictive search and the main search results page often use different settings or templates. The main search results template in Horizon might just be configured to loop through and display only product resource types, effectively filtering out your valuable pages and blog posts.
Digging into the Code: How to Fix It
Alright, so now that we understand the 'why,' let's get to the 'how.' The good news is that because Shopify's indexing is working (your content is showing in predictive search!), the fix involves a few targeted tweaks to your theme's Liquid code. This is where the community really shined, offering direct, actionable steps.
Important Pre-Step: Back Up Your Theme! Before making any code changes, always, always, always duplicate your theme. This way, if anything goes awry, you can easily revert to a working version. Go to Online Store > Themes, find your current theme, click Actions > Duplicate.
Once you've backed up, here's what you need to do:
Step 1: Broaden Your Search Input Scope
First, we need to tell the search form itself to look for more than just products. This involves modifying a file called search-input.liquid.
- From your Shopify admin, go to Online Store > Themes.
- Find your Horizon theme and click Actions > Edit code.
- In the file editor, navigate to the blocks folder and open
search-input.liquid. - Look for a line that likely has
value="product". You'll want to change this to include pages and articles. - Replace the line that looks like
value="product"with the following:value="product,page,article" - Click Save.
Step 2: Update the Search Results Page Logic
Next, we need to tell the actual search results page to render all the different types of results it's now receiving. This usually happens in search-results.liquid.
- While still in the code editor, navigate to the sections folder and open
search-results.liquid. - Look for a line that filters the search results to only products. It will likely look something like this:
{% assign products = search.results | where: 'object_type', 'product' %} - You need to replace this line to simply assign all search results, removing the product-specific filter:
{% assign products = search.results %} - Click Save.
Step 3: Check for Other Filters (Advanced)
Sometimes, themes can have additional filters in other files. As Sajini-Annie and liquidshop.co pointed out, it's worth a quick check if the above steps don't fully resolve the issue. You might need to look in files like:
main-search.liquidsearch.jsonpredictive-search.liquid(though this is less likely for the full results page)- Other search-related snippets or sections.
Specifically, look for code snippets that explicitly filter results, such as:
{% if item.object_type == 'product' %}
or
where: 'object_type', 'product'
If you find such filters, you might need to adjust them to include page and article types, or remove them if they're overly restrictive for the main search results display.
Also, Sajini-Annie mentioned checking for a hidden input field in the search form itself that might be restricting results, like:
If you find this, you'd want to update its value to include page and article, similar to what we did in search-input.liquid.
Here's what kevalt was seeing, which perfectly illustrates the problem:
See, in search bar suggestions page is visible
But in search page result page not visible
And the same applied to blog pages as well.
Once you've made these changes, clear your browser cache and test your store's search thoroughly. You should now see your pages and blog articles proudly displayed alongside your products on the main search results page. It's a small change, but it makes a huge difference in user experience and helps your customers find all the valuable content you've worked so hard to create.
This community discussion really highlights how important it is to understand your theme's specific implementations, and how a little Liquid code knowledge can go a long way in tailoring your Shopify store exactly how you need it. Huge thanks to topnewyork, AnneLuo, Sajini-Annie, and liquidshop.co for their excellent contributions and for helping kevalt – and countless others – get their search working perfectly!

