Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active December 30, 2015 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/7861980 to your computer and use it in GitHub Desktop.
Save jchristopher/7861980 to your computer and use it in GitHub Desktop.
Limit all SearchWP searches to 5 words instead of the default 6
<?php
function my_searchwp_max_search_terms( $maxTerms, $engine ) {
// limit to 5 search terms
return 5;
}
add_filter( 'searchwp_max_search_terms', 'my_searchwp_max_search_terms', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment