Last active
December 21, 2015 12:28
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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