WordPress: Search form submission with no term doesn’t use search.php. How can I get it to?

I have a WordPress site, and I noticed that if I submit the search form without entering a term it the URL is “http://example.com/?s=” but it uses the index.php template instead of the search.php template. I would like it to still use the search.php file displaying no results. Or, I would like it to redirect to the front page (which is a static page). How can I accomplish either of these? Thanks.

Related posts

Leave a Reply