Search Terms Dotifier:
Here's one idea using the request
filter to append "dotted" words of two or three characters that don't contain any dots, to the current search terms.
So if your search string is for example:
The LA Dreams
it will become:
The LA Dreams L.A.
Here's a demo plugin to modify the default search:
<?php
/**
* Plugin Name: Search Terms Dotifier
* Author: birgire
* Plugin URI: http://wordpress.stackexchange.com/a/157972/26350
* Version: 0.0.1
*/
add_filter( 'request', function( $request ) {
if( ! is_admin() && isset( $request['s'] ) )
{
// Dont' dotify these words (lower case):
$exclude = array( 'the', 'in', 'it', 'he', 'she', 'was' );
// Loop over search terms:
$words = explode( ' ', $request['s'] );
foreach( (array) $words as $word )
{
// Words with two or three chars that don't contain any dots:
if( mb_strlen( $word ) > 1
&& mb_strlen( $word ) < 4
&& false === strpos( $word, '.' )
&& ! in_array( mb_strtolower( $word ), $exclude, true )
)
{
// Append the 'dotted' word:
$words[] = join( '.', str_split( $word ) ) . '.';
}
}
$request['s'] = join( ' ', $words );
}
return $request;
});
You can hopefully extend this further to your needs.