The problem is the periods: they are replaced with spaces. If this word appears only in this post, the easiest solution is to make sure the word “fox” appears somewhere in the post – it can even be a user-invisible custom field – but if these words are common, it’s possible to add a filter that fixes this.
yes that is Brand name F.O.X and we have many product wir this name, how I can add a filter to fix this? Thx.
add_filter( 'relevanssi_remove_punctuation', function( $str ) {
return str_replace( 'f.o.x', 'fox', $str );
}, 9 );
Add this to a code snippet or in the theme functions.php and reindex.
Sorry i wroute that is workking, but the “F.O.X” in the tittle dont see in Index, only if this name is in text or slug, but not in tittle.
Try this:
add_filter( 'relevanssi_post_title_before_tokenize', function( $title ) {
return str_ireplace( 'f.o.x', 'fox', $title );
} );
Again, add this and reindex.