Change default search form behavior

Hello,

I would like to know if it is possible to change the default search form behavior (by WordPress). When pressing the search button without any text inserted, the query returns a page full of posts, etc. When nothing is inserted, I’d like the form to display no results at all or pop up a message saying e.g. “Please type something”.

Any help would be much appreciated.

Thanks :slight_smile:

Hi @jiks,

I hope you are well today and thank you for your question.

You can try achieving this by using the attached small plugin specially developed for you that contains some custom code.

Best Regards,
Movin

Hello,

Thank you very much for your solution. That’s exactly what I wanted. :slight_smile:

Good weekend!

You are most welcome here :slight_smile: