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_th_partial_matches

View Parameters »

When highlighting is enabled, SearchWP will highlight only exact matches by default. If instead you would prefer that partial matches are highlighted you can use this hook:

<?php
// Tell SearchWP to use partial matches when highlighting.
add_filter( 'searchwp_th_partial_matches', '__return_true' );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$partial Boolean

Whether to highlight partial matches

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