I need a little help with my search bar

2 replies
Thanks in advance, guys.

I would like to be able to customize the page that shows up after a person types something in the search bar and no results come back.

Example:
-Let's say someone types in "shoes" and I have a pants website.
-The page that shows up is says:
"Nothing Found
Sorry, but nothing matched your search terms. Please try again with some different keywords."
-I would like to customize what it says and add links to discourage people from simply exiting the page.
-I am not using a search plugin, but might be in the future.

*Note: I'm not 100% illiterate but about 70% so talk to me like a newbie anyways.

Thank you again for your time!
#bar #search
  • Profile picture of the author bubb
    Hi Joel,

    From the "nothing found" message you've posted I believe you are using Wordpress. If you want to change the message that's displayed when a search doesn't return any results follow these steps:

    1) Access the location where your Wordpress is installed. You can do this either by connecting via FTP / SSH to your hosting provider. Alternatively, your provider may have a 'File Manager' or similar in your cPanel. If you are developing locally, simply open the folder where your Wordpress install is located.

    2) Open the theme directory for the currently active theme. This can be found from the root of your website files by opening wp-content then themes followed by the name of your theme (for example twentysixteen)

    3) Open the languages folder and edit the .pot file found inside it. For example, with the twentysixteen theme the file in this folder will be twentysixteen.pot

    4) Scroll down until you find the line with the text:
    "Sorry, but nothing matched your search terms. Please try again with some "
    "different keywords."
    This is on line 312 in the twentysixteen theme but may be elsewhere on your theme. Edit the text, to whatever content you wish!

    If you want to provide more indepth responses for searches with zero results, you may wish to go down the plugin route as mentioned so you can offer related items.
    {{ DiscussionBoard.errors[10774790].message }}
    • Profile picture of the author Joel Bechlem
      Awesome. Incredibly helpful. Thanks a ton. Either by plugin or directory I am confident I can solve the issue now. Thanks!


      Originally Posted by bubb View Post

      Hi Joel,

      From the "nothing found" message you've posted I believe you are using Wordpress. If you want to change the message that's displayed when a search doesn't return any results follow these steps:

      1) Access the location where your Wordpress is installed. You can do this either by connecting via FTP / SSH to your hosting provider. Alternatively, your provider may have a 'File Manager' or similar in your cPanel. If you are developing locally, simply open the folder where your Wordpress install is located.

      2) Open the theme directory for the currently active theme. This can be found from the root of your website files by opening wp-content then themes followed by the name of your theme (for example twentysixteen)

      3) Open the languages folder and edit the .pot file found inside it. For example, with the twentysixteen theme the file in this folder will be twentysixteen.pot

      4) Scroll down until you find the line with the text:
      "Sorry, but nothing matched your search terms. Please try again with some "
      "different keywords."
      This is on line 312 in the twentysixteen theme but may be elsewhere on your theme. Edit the text, to whatever content you wish!

      If you want to provide more indepth responses for searches with zero results, you may wish to go down the plugin route as mentioned so you can offer related items.
      {{ DiscussionBoard.errors[10775561].message }}

Trending Topics