Created
March 24, 2020 13:15
-
-
Save jchristopher/5b16c0918f8fb91956e7b2cc4afadbf0 to your computer and use it in GitHub Desktop.
Always add 'coffee' to SearchWP partial matches even if it's not
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 | |
// Always add 'coffee' to partial matches even if it's not. | |
add_filter( | |
'searchwp\query\partial_matches\tokens', | |
function( $partial_match_tokens, $args ) { | |
$partial_match_tokens[] = 'coffee'; | |
return $partial_match_tokens; | |
}, | |
10, 2 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment