Hi community
my website is sneakersafe.co.uk
Because I’m using an app, it gives me results for mispelled words. How can I hide the number of search results for both 0 results and n results? All of the text circled. Thank you
Hi community
my website is sneakersafe.co.uk
Because I’m using an app, it gives me results for mispelled words. How can I hide the number of search results for both 0 results and n results? All of the text circled. Thank you
Hi @Timito
This solution requires editing of your theme code. Edit the code for a theme only if you know HTML and CSS, and have a basic understanding of Liquid. To know more what is theme editing, please visit:
https://help.shopify.com/en/manual/online-store/os/using-themes/managing-themes/duplicating-themes
Before you customize your theme, it’s a good idea to duplicate your theme to create a backup copy. This makes it easy to discard your changes and start again if you need to. Here are steps to duplicate a theme:
From your Shopify admin, go to Online Store > Themes.
For the theme that you want to duplicate, click Actions > Duplicate.
Solution of your specific issue:
From your Shopify admin, go to Online Store > Themes.
Find the theme you want to edit, and then click Actions > Edit code.
In the Templates directory, click to open your search.liquid file.
Find the following piece of code in search.liquid file (usually begins at line#4):
{% if search.performed == false %}
# {{ 'general.search.title' | t }}
{% else %}
#
{{ 'general.search.heading' | t: count: search.results_count }}:
{{ 'general.search.results_with_count' | t: terms: search.terms, count: search.results_count }}
{% endif %}
# {{ 'general.search.title' | t }}
I hope this will help.
Thanks!
thank you for your help, but I still get some text when I search for something
The top line appears in every search, and the bottom line appears when the search result number is 0
Solved! I changed ‘general.search.title’ to :empty
That’s great!
You can also remove the following code from search.liquid file to remove the line “Try checking your spelling or using different words”
{% if search.performed and search.results_count == 0 %}
{{ 'general.search.no_results' | t }}
{% endif %}
Thanks!
Is there a way to do this on dawn theme?