Available since: 3.0
searchwp_like_wildcard_before
View Parameters »By default when partial matching is enabled, SearchWP will apply a LIKE
wildcard before the search term. If you would like to prevent that you can use this hook:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent SearchWP from using a wildcard before search terms when finding partial matches. | |
add_filter( 'searchwp_like_wildcard_before', '__return_false' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$wildcard_before |
Boolean |
Whether to use a wildcard prefix |