Customize the list of stopwords SearchWP uses by adding your own custom words
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 | |
function my_searchwp_stopwords( $terms ) { | |
// add 'lorem', 'ipsum', and 'dolor' to SearchWP's default terms | |
$terms[] = 'lorem'; | |
$terms[] = 'ipsum'; | |
$terms[] = 'dolor'; | |
return $terms; | |
} | |
add_filter( 'searchwp_stopwords', 'my_searchwp_stopwords' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment