Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active April 26, 2019 14:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jchristopher/7563164 to your computer and use it in GitHub Desktop.
Customize the list of stopwords SearchWP uses by adding your own custom words
<?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