Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prevent SearchWP from initializing
<?php
// prevent SearchWP from initializing itself unless it's a search page
function my_searchwp_init() {
return is_search();
}
add_filter( 'searchwp_init', 'my_searchwp_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.