WordPress 3.6, searchform.php problems

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.

Leave a Comment