Relevanssi sees “s.w.a.t.” as “s w a t”, and then just discards it.
One way to fix this is to add this to your theme functions.php
:
add_filter( 'relevanssi_remove_punctuation', 'swat_fix', 8 );
function swat_fix( $a ) {
$a = str_replace( 's.w.a.t.', 'swat', $a );
return $a;
}
I added it to the child theme functions.php, but it is still not found. Maybe the post is not indexed?
The Link is https://xx/2020/12/30/s-w-a-t-2017/
Title “S.W.A.T. (2017–)”
-
This reply was modified 1 year, 5 months ago by
movieclass.
I’ve checked the debug version.
I’m getting as result: Post title
2017
Try save the post. Does that help?
i’m saved it, no change.
I’m also tried to Rewrite & Republish it, no change.
indexing/Post Title doesnt change
i disabled the plugin and tried to search with the default search..
it works perfectly.
Change the function to this and then save the post:
add_filter( 'relevanssi_remove_punctuation', 'swat_fix', 8 );
function swat_fix( $a ) {
$a = str_ireplace( 's.w.a.t.', 'swat', $a );
return $a;
}