searchwp\query\partial_matches\did_you_mean
Since: 4.0.0
Table of Contents
Control whether SearchWP’s performs “Did you mean?” style corrections to searches that apply partial matching logic.
Parameters
Type | Parameter | Default | Since | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Boolean | $enabled |
true |
4.0.0 |
|||||||||
Array |
$args
|
4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Disable "Did you mean?" functionality
Disable “Did you mean?” functionality
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
<?php | |
// Disable SearchWP's "Did you mean?" functionality. | |
add_filter( 'searchwp\query\partial_matches\did_you_mean', function( $enabled, $args ) { | |
return false; | |
}, 10, 2 ); |