Available since: 3.0
searchwp_like_stem
View Parameters »By default SearchWP will use submitted terms to perform partial matching, but if you would prefer that partial matching is applied to keyword stems instead you can use this hook:
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 | |
// Tell SearchWP to use keyword stems for partial matches. | |
add_filter( 'searchwp_like_stem', function( $use_stem, $terms, $engine ) { | |
return true; | |
}, 20, 3 ); |
Parameters
Parameter | Type | Description |
---|---|---|
$use_stem |
Boolean |
Whether to use stems for partial matches |
$terms |
Array |
Submitted terms |
$engine |
String |
Engine in use |