• Hello,

    On my e-commerce site, I need the users to be able to search for the term:
    AC/DC

    Now, it only shows 2 items (there is almost 200 items with the string AC/DC)

    I believe the issue comes from the /

    I’ve be looking to make it so that the / is not consider as a special character, but with no luck so far.

    Thanks in advance for your help.

    Best regards

    The page I need help with: [log in to see the link]

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

    (@msaari)

    Hi, you’re on the right track. You need to make Relevanssi remove the slashes, instead of replacing them with spaces. Here’s how you do that:

    add_filter( 'relevanssi_punctuation_filter', 'rlv_adjust_punctuation' );
    function rlv_adjust_punctuation( $replacements ) {
        $replacements['/'] = '';
        return $replacements;
    }

    Add this to your theme functions.php or in a code snippet and then rebuild the index.

    Thanks so much! It works perfectly.

    Plugin Author Mikko Saari

    (@msaari)

    If this was helpful to you, please consider leaving a review.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to include / in a search’ is closed to new replies.