SearchWP

This Documentation is for SearchWP Version 3

Available since: 1.0

searchwp_minimum_word_length

Note: Use of this hook will require a manual reindex

By default, SearchWP only indexes (and includes searches for) words that are at least three characters long. You can modify that with this filter.

Example: To index and search for words with at least two characters, add the following to your active theme’s functions.php:

<?php
function my_searchwp_minimum_word_length() {
// index and search for words with at least two characters
return 2;
}
add_filter( 'searchwp_minimum_word_length', 'my_searchwp_minimum_word_length' );
view raw gistfile1.php hosted with ❤ by GitHub