Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 3.1


View Parameters »

SearchWP has the ability to support “Did you mean?” style search suggestions for queries that yielded no results. This feature can be enabled by ticking the checkbox on the Advanced tab of the SearchWP settings screen, or programmatically using this hook:

// Enables "Did you mean?" search corrections in SearchWP.
add_filter( 'searchwp_do_suggestions', function( $enabled, $args ) {
// $args contains the search arguments.
return true;
} );
view raw functions.php hosted with ❤ by GitHub

With this feature enabled, SearchWP will automatically correct misspellings and output a note indicating that a correction has been made.

For additional information please see Automatic “Did you mean” (search query corrections)


Parameter Type Description
$enabled Boolean

Defaults to false

$args Array

The arguments passed to the search algorithm

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP