Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

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

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP