Available since: 3.0
searchwp_like_min_length
View Parameters »In order to prevent partial matches on terms that are too short, SearchWP has a minimum word length when finding partial matches using LIKE
logic. You can adjust that minimum length using 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 | |
// Change SearchWP's partial match (LIKE logic) minimum word length. | |
add_filter( 'searchwp_like_min_length', function( $length ) { | |
return 4; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$length |
Integer |
Minimum partial match word length |