Last active
December 30, 2015 17:38
-
-
Save jchristopher/7861980 to your computer and use it in GitHub Desktop.
Limit all SearchWP searches to 5 words instead of the default 6
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_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