Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created March 25, 2022 17:12
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 searchwpgists/b4cf6610f2e6c528e0ce4259d03871cf to your computer and use it in GitHub Desktop.
Save searchwpgists/b4cf6610f2e6c528e0ce4259d03871cf to your computer and use it in GitHub Desktop.
Disable minimum character length for tokens (search terms) in SearchWP
<?php
// Reduce SearchWP's minimum character length to 2 (default is 3).
add_filter( 'searchwp\tokens\minimum_length', function( $min ) {
return 2;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment