Shopify Search Fix: Getting Pages & Blogs to Show Up in Horizon Theme Results
Hey everyone, your friendly Shopify migration expert here! I've been diving into the community forums again, and a really common, yet often puzzling, issue popped up that I wanted to chat about. It's one of those 'why is this happening?' moments that can leave store owners scratching their heads, especially when migrating or switching themes.
The thread, initially posted by @kevalt, was titled "Pages and Blogs Not Appearing on Search Results Page in Horizon Theme." Now, if you're running the Horizon theme, or even some other newer themes, this might sound painfully familiar. Kevalt noticed that while pages and blog articles would pop up beautifully in the predictive search suggestions (that handy dropdown as you type), they'd vanish into thin air once they hit the actual /search results page. Meanwhile, products showed up just fine. What gives?
Here's what Kevalt saw, and perhaps you've seen it too:
And then on the actual search results page:
Understanding the 'Why': Theme Design Differences
Several experts in the thread, including AnneLuo, Sajini-Annie from Identixweb, and liquidshop.co, quickly chimed in with the core reason. It's not a Shopify platform limitation at all! Shopify's indexing is actually working perfectly, which is why those items show up in the predictive search. The issue lies squarely in how different themes are designed and implemented.
Think of it this way:
- Dawn Theme (and similar): Often built for a "site-wide search" experience. It's designed to display products, pages, and blog articles all together on the full search results page.
- Horizon Theme (and similar newer themes): Tends to be designed for a "product-focused search." While the predictive search might be broad, the actual
/searchresults page is typically configured to display only products by default.
This difference comes down to the theme's Liquid code. The predictive search (the dropdown as you type) often pulls from a broader set of resource types (products, pages, blog articles, collections, queries). However, the main search results page template, like search-results.liquid or main-search.liquid, often includes filters or loops that specifically look for object_type == 'product' or use a hidden input with name="type" value="product", thereby limiting the displayed results.
The Fix: Diving into Your Theme Code
Alright, so we know the problem. Now for the solution! Thankfully, the community provided a very clear, actionable fix. This involves making a couple of small, but crucial, edits to your theme's Liquid files. As always, before making any code changes, it's a really good idea to duplicate your theme first. That way, you have a backup if anything goes awry!
Here's how to get your pages and blog articles appearing on your Horizon theme's search results page, based on the steps shared by @topnewyork:
Step 1: Update the Search Input to Request More Object Types
First, we need to tell the search form itself to look for more than just products. This is done in the file that defines your search input.
- Go to your Shopify Admin.
- Navigate to Online Store > Themes.
- Find your current theme (Horizon, in this case), click Actions > Edit code.
- In the file editor, look for the
blocksfolder and findsearch-input.liquid. - Inside this file, you'll be looking for a line that likely has
value="product". You need to change this to include pages and articles. - Replace:
With:value="product"
value="product,page,article" - Save the file.
This change tells the search query to pull results for products, pages, and articles when submitted.
Step 2: Modify the Search Results Page to Render All Found Object Types
Next, even if the search input is now requesting pages and articles, the actual search results page might still be filtering them out. We need to adjust its rendering logic.
- Still in the theme code editor, go to the
sectionsfolder. - Find the file named
search-results.liquid. - Inside this file, you'll likely find a line that specifically assigns only products to be displayed from the search results.
- Replace this line:
With this simpler, broader assignment:{% assign products = search.results | where: 'object_type', 'product' %}
{% assign products = search.results %} - Save the file.
By making this change, you're telling the search-results.liquid template to consider all the results returned by the search query, not just those with an object_type of 'product'. You might then need to add rendering logic for pages and articles, similar to how products are displayed. For example, you might see {% if item.object_type == 'product' %} blocks; you'd need to extend these with {% elsif item.object_type == 'page' %} and {% elsif item.object_type == 'article' %} sections to properly display their titles, links, and snippets.
After saving both files, clear your browser cache and test your store's search functionality. You should now see your pages and blog articles appearing right alongside your products on the main search results page!
It's a great example of how a small tweak in theme code can unlock the full potential of Shopify's built-in features. The community really came through on this one, offering both the 'why' and the 'how' to solve a common theme-specific challenge. Always remember to back up your theme, and don't be afraid to experiment a little – that's how we learn and make our stores even better!

