Skip to content

Instantly share code, notes, and snippets.

@jeffreyd00
Created September 25, 2015 20:41
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 jeffreyd00/a5188654c9f40eb7ee87 to your computer and use it in GitHub Desktop.
Save jeffreyd00/a5188654c9f40eb7ee87 to your computer and use it in GitHub Desktop.
/* Search WP Functions
----------------------------------------------------------- */
/* includes search terms that are close in spelling to those indexed */
function my_fuzzy_word_length()
{
return 4;
}
add_filter( 'searchwp_fuzzy_min_length', 'my_fuzzy_word_length' );
/* 65% match primitive spell checking */
function my_fuzzy_threshold()
{
return 65;
}
add_filter( 'searchwp_fuzzy_threshold', 'my_fuzzy_threshold' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment