08/29/2015 at 10:58 am
#344842
Keymaster
@ Charles
Ahhh… the added details helped. Obviously I didn’t think of this before, but the reason is “will” is one of the search stop words. I use the same stop word list as WordPress uses… stop words are terms that are stripped from search queries because they are too common of a word. hey are removed from search queries because these words would result is a very high number of unrelated search results.
This can be addressed with a filtering that stop word list to remove “will”. Here’s how:
Install the Code Snippets plugin.
Add a new snippet with the following code.
add_filter( 'wp_search_stopwords', 'cn_filter_stopwords' );
function cn_filter_stopwords( $stopwords ) {
if ( $key = array_search( 'will', $stopwords ) ) {
unset( $stopwords[ $key ] );
}
return $stopwords;
}
Save and activate the new snippet.
Now “will” should be removed from the stop words so he should now show up as a search result.
Hope that helps, let me know.
