Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created September 17, 2018 16:22
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/db2c8a4e105b52716485ed283868bae2 to your computer and use it in GitHub Desktop.
Save jchristopher/db2c8a4e105b52716485ed283868bae2 to your computer and use it in GitHub Desktop.
Change the minimum character count for SearchWP LIKE Terms
<?php
// Apply LIKE matching for terms 2 or more characters in length.
function searchwp_like_min_length( $length ) {
return 2;
}
add_filter( 'searchwp_like_min_length', 'my_searchwp_like_min_length' );
@thejulle
Copy link

Hi, the function names don't match. The function should be my_searchwp_like_min_length()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment