Skip to content

Instantly share code, notes, and snippets.

Last active April 26, 2019 14:33
What would you like to do?
Customize the list of stopwords SearchWP uses by adding your own custom words
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