SearchWP

This Documentation is for SearchWP Version 3

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:

<?php
// Tell SearchWP to use keyword stems for partial matches.
add_filter( 'searchwp_like_stem', function( $use_stem, $terms, $engine ) {
return true;
}, 20, 3 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$use_stem Boolean

Whether to use stems for partial matches

$terms Array

Submitted terms

$engine String

Engine in use