• Resolved kasenga

    (@kasenga)


    Hi,

    I have several posts which have a “o.T.” in the title and I want these posts to be found with this search term. What can I do?

    I already set the minimum word length to 2 and the decimal separators to “keep”. But that doesn’t help.

    Thanks in advance.
    kasenga

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That’s not a decimal separator: decimal separators are periods that are between numbers.

    Try this:

    add_filter( 'relevanssi_remove_punctuation', 'rlv_ot_fix' );
    function rlv_ot_fix( $a ) {
        $a = str_replace( 'o.t.', 'ot', $a );
        return $a;
    }

    Add this to your theme functions.php and reindex. Does the search work now?

    Thread Starter kasenga

    (@kasenga)

    Hi Mikko,

    thank you for the code, but unfortunately it’s not working.

    Thanks anyway
    kasenga

    Plugin Author Mikko Saari

    (@msaari)

    Try this, this should work better:

    add_filter( 'relevanssi_remove_punctuation', 'rlv_ot_fix', 9 );
    function rlv_ot_fix( $a ) {
        $a = str_replace( 'o.t.', 'ot', $a );
        return $a;
    }
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Search query o.T.’ is closed to new replies.