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_fuzzy_threshold

View Parameters »

When finding partial matches (specifically when finding fuzzy matches) SearchWP will limit fuzzy matches depending on how closely terms sound alike on a scale from 0 to 100. You can customize the threshold using this hook:

<?php
// Increase SearchWP's fuzzy matching threshold.
add_filter( 'searchwp_fuzzy_threshold', function( $threshold ) {
return 80;
} );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$threshold Integer

Minimum threshold to consider a fuzzy match

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