I have just updated to wordpress 3.6 and my theme seems to be ignoring my searchform.php file. Has this happened to anyone else?
2 Answers
The answer is taken from WordPress.org Support Forum thread:
» 3.6 upgrade – searchform.php not working
As salcode said:
Adding this code to your functions.php
should do the trick:
function search_form_no_filters() {
// look for local searchform template
$search_form_template = locate_template( 'searchform.php' );
if ( '' !== $search_form_template ) {
// searchform.php exists, remove all filters
remove_all_filters('get_search_form');
}
}
add_action('pre_get_search_form', 'search_form_no_filters');
And as from the experience from RoseCoder, you can remove the searchform.php
as it was no longer needed.