Add another Search Form to a No Results Page in Genesis

The ‘no results page’ from a search in Genesis leaves the visitor with not much info to go on,  and if the no results page is a full width page with no sidebar which had contained the search widget it would be nice to have the option to quickly search again.

genesis-no-results

Genesis no results page

Make a Child Theme Search Template

You can copy the search.php template from the Genesis framework into your child theme and then that template will be used to control the display and output.

To change the text for Search Results for:

Change the relevant text in the highlighted line below..

To change the text further down “Sorry, no content matched your criteria.” and add another search box you can remove the default action that occurs when no results are found and add your own custom action – that action is the genesis_do_noposts

So above I am removing the the genesis_do_noposts and adding my own, my own has custom wording and also a includes another search form get_search_form(); – you can add anthing else which may work well in this area to keep the user engaged in the site.

Add in some CSS to finish it off.

genesis-search-again