How do I remove page content from search results?

Solved
Excursionist
35 3 5

Hope somebody can help with this.

On this site https://grant-testing-store.myshopify.com/ I need to remove the page content that appears in the search results when using the Search form in the header. eg, a search for Rossum using the 'Search for Rossum' option (or presing enter or selectign the magnifying glass) from the Search dropdown options gives a page of results made up of products and 2 pages where the word Rossum appears. I don't want the pages to get listed. How do I remove them from the search results?

search-for.jpg

The site is currently password protected, please use this if you need to test, password = grant-test

Cheers

Grant

 

 

0 Likes
Excursionist
35 3 5

Further to this problem I have found this page in Shopify tutorials that discusses customizing the search results https://shopify.dev/tutorials/customize-theme-edit-storefront-search-results

It states that adding the line with the comment ADDED BY GRANT below  to the search-form.liquid file will only return product items in the search results, but it does not appear to be working. (The page also says to add the line to the form in search.liquid page, which I have done as well).

<form action="{{ routes.search_url }}" method="get" class="search-header search search--focus" role="search">
  <input class="search-header__input search__input"
    type="search"
    name="q"
    placeholder="{{ 'general.search.placeholder' | t }}"
    aria-label="{{ 'general.search.placeholder' | t }}"> 
    <input type="hidden" name="type" value="product"> <!-- ADDED BY GRANT -->
  
  <button class="search-header__submit search__submit btn--link site-header__icon" type="submit">
    {% include 'icon-search' %}
    <span class="icon__fallback-text">{{ 'general.search.submit' | t }}</span>
  </button>
</form>

 

 

The tutorial does not say whether anything should be removed from the form. Should anything be removed from the form?

Can any Shopify experts or staff help with this please. I've tried to get this working but I am stumped.

This is in the Debut theme.

Cheers

Grant

0 Likes
Excursionist
35 3 5

This is an accepted solution.

As I have yet to hear from anybody that could assist with this and I couldn't solve any of the above issues myself I got assistance from the great people at Globo Software Solutions. They were able to sort out the above for me (even though it was a Shopify issue) - I am using their Smart Product Filter app to manage the sidebar filtering on collections.

Grant

0 Likes