Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active January 30, 2020 15:54
Embed
What would you like to do?
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