I would like to customise the Search Form that you drag and drop from the widgets panel.

The customisation will be more than just css changes. I would like to add and custom classes. Is this possible?

Is there a hook to customise the Search Field?

The only option I can think of is to create a custom search widget.

  • @ChinmoyKumarPaul, can you please make an answer out of your comment? – Mark Kaplun Aug 5 '14 at 8:08

if your theme have not search-form.php file then you will create the file and add the custom css there. Because search widget is calling the get_search_form() function. First it will search the search-from.php file from activated theme folder. If there have no file then it will call wp's default search form.

See the Codex


If you landed here, it is searchform.php in WP v4.6.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.