Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active January 30, 2020 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/bc0220a567f925d1125d73a6bf52163f to your computer and use it in GitHub Desktop.
Save jchristopher/bc0220a567f925d1125d73a6bf52163f to your computer and use it in GitHub Desktop.
Prevent SearchWP from outputting notice about search query corrections
<?php
// Prevent SearchWP from outputting notice about search query corrections.
add_filter( 'searchwp_auto_output_revised_search_query', function( $enabled, $args ) {
// $args contains the search query arguments for the search
// $args['type'] will be 'did-you-mean' for "Did you mean?" corrections
return false;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment