Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 22, 2015 13:42
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/266574d6a96bf18376ae to your computer and use it in GitHub Desktop.
Save jchristopher/266574d6a96bf18376ae to your computer and use it in GitHub Desktop.
Modify the threshold for SearchWP shifting into a more aggressive AND logic pass when too many results are returned
<?php
// if over 100 results are returned from an AND logic pass
// refine the AND results by title
function my_searchwp_max_and_results( $number_of_results ) {
return 100;
}
add_filter( 'searchwp_max_and_results', 'my_searchwp_max_and_results' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment