Skip to content

Instantly share code, notes, and snippets.

@yratof
Last active December 21, 2015 12:28
Show Gist options
  • Save yratof/6305617 to your computer and use it in GitHub Desktop.
Save yratof/6305617 to your computer and use it in GitHub Desktop.
Wordpress 3.6 Searchform.php isn't seen anymore. Add this to your functions.
// Wordpress 3.6 seems to have messed up the searchform
// Credit: http://salferrarello.com/searchform-php-wordpress-3-6-broken/
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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment