This Documentation is for SearchWP Version 3

Available since: 3.0


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:

// Change SearchWP's partial match (LIKE logic) minimum word length.
add_filter( 'searchwp_like_min_length', function( $length ) {
return 4;
} );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$length Integer

Minimum partial match word length