Excluding blog posts and pages from in store search

Topic summary

A user seeks to exclude blog posts and pages from their Shopify store’s search results, wanting only products to appear when customers search.

Solution Provided:
Another participant recommends using Shopify’s native Search & Discovery app:

  • Navigate to: Online Store > Navigation > Collection and search filters > Shopify Search & Discovery
  • Install the app if not already present
  • Access Settings to configure which content types appear in search results
  • This allows selective filtering of blog posts and pages from search

User Concerns:
The original poster expresses concern about potential conflicts with their existing third-party filter app (Impulse 2.0).

Outcome:
The helper confirms the Shopify Search & Discovery app can be uninstalled if it causes issues, though the user prefers keeping their current filter app. The discussion concludes positively with the user reporting everything appears functional so far.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Hi, can anyone advise on how to exclude blog posts from in store search results, as I only want my products to show up when visitors are searching for them. I am using Impulse 2.0

thanks in advance!

Hi @ANGELA666 , can you share your search.liquid code?

sure!

{%- render 'breadcrumbs' -%}

{{ 'general.search.title' | t }}

{%- render ‘predictive-search’, context: ‘search-page’ -%}

{%- if search.performed -%}


{%- if search.results_count == 0 -%}

{{ 'general.search.no_results_html' | t: terms: search.terms | replace: '*', '' }}

{%- endif -%}

{%- if search.results_count != 0 -%}

{%- assign paginate_by = section.settings.per_row | times: section.settings.rows_per_page -%}
{%- paginate search.results by paginate_by -%}

{%- render 'collection-grid-filters', collection: search, enable_sidebar: section.settings.enable_sidebar, filter_style: section.settings.filter_style, collapsed: section.settings.collapsed, enable_color_swatches: section.settings.enable_color_swatches -%}
{% render 'collection-grid', collection: search, items: search.results, enable_sidebar: section.settings.enable_sidebar, filter_style: section.settings.filter_style, enable_sort: true, enable_collection_count: true, per_row: section.settings.per_row, mobile_flush_grid: section.settings.mobile_flush_grid quick_shop_enable: settings.quick_shop_enable %}

{%- if paginate.pages > 1 -%}
{%- render ‘pagination’, paginate: paginate -%}
{%- endif -%}

{%- endpaginate -%}

{% endif %}

{%- endif -%}

{%- if section.settings.enable_sidebar == false or section.settings.filter_style == ‘drawer’ -%}
{% comment %}
Override grid styles if sidebar is disabled
{% endcomment %}

.search-content .grid__item--sidebar { width: 0; } .search-content .grid__item--content { width: 100%; } .grid__item--sidebar { position: static; overflow: hidden; }

{%- endif -%}

{% schema %}
{
“name”: “t:sections.main-search.name”,
“settings”: [
{
“type”: “header”,
“content”: “t:sections.main-search.settings.header_filtering_and_sorting”
},
{
“type”: “checkbox”,
“id”: “enable_sidebar”,
“label”: “t:sections.main-search.settings.enable_sidebar.label”,
“default”: true,
“info”: “t:sections.main-search.settings.enable_sidebar.info”
},
{
“type”: “checkbox”,
“id”: “collapsed”,
“label”: “t:sections.main-search.settings.collapsed.label”,
“default”: true
},
{
“type”: “select”,
“id”: “filter_style”,
“label”: “t:sections.main-search.settings.filter_style.label”,
“default”: “sidebar”,
“options”: [
{
“value”: “sidebar”,
“label”: “t:sections.main-search.settings.filter_style.options.sidebar.label”
},
{
“value”: “drawer”,
“label”: “t:sections.main-search.settings.filter_style.options.drawer.label”
}
]
},
{
“type”: “checkbox”,
“id”: “enable_color_swatches”,
“label”: “t:sections.main-search.settings.enable_color_swatches.label”,
“info”: “t:sections.main-search.settings.enable_color_swatches.info”
},
{
“type”: “range”,
“id”: “per_row”,
“label”: “t:sections.main-search.settings.per_row.label”,
“default”: 4,
“min”: 2,
“max”: 5,
“step”: 1
},
{
“type”: “range”,
“id”: “rows_per_page”,
“label”: “t:sections.main-search.settings.rows_per_page.label”,
“default”: 7,
“min”: 3,
“max”: 20,
“step”: 1
},
{
“type”: “checkbox”,
“id”: “mobile_flush_grid”,
“label”: “t:sections.main-search.settings.mobile_flush_grid.label”,
“default”: false
}
]
}
{% endschema %}

Go to your Online store > Navigation > Collection and search filters > Shopify Search & Discovery > click Open if you already installed, if you are not, click Install. After you are done, go to Settings of this app then you can select which will appear to store search results

4 Likes

thank you so much! I have a filter app that I am using, the shopify one won’t mess any of that up will it?

1 Like

You can uninstall the app if it causes any issues.

1 Like

I love the app, don’t want to uninstall it, so far it all looks ok, thanks for your help!

1 Like

Happy I could help :heart: