• Resolved SimplePowerIT

    (@simplepowerit)


    I have lots of parts that have hypens, dashes, and slashes in the product name.
    I have the default settings enabled to replaces these with spaces.

    My question is, I would like the parts only to display if the whole and complete part number is typed in the search box. This has been working fine for parts w/o special characters. But now that I have parts w/ these special characters, the search results are providing lots of results that include only partial search terms.

    What settings are needed in order to limit the search terms with special characters to only display with the whole and complete part numbers including hypens,dashes, and slashes?

    Thank you

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

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

    (@msaari)

    Adjust the settings so that the hyphens, dashes and slashes are removed. That way the parts of the product names are not indexed separately, and only the whole product name is considered.

    Thread Starter SimplePowerIT

    (@simplepowerit)

    Hi @msaari,

    Thanks for you reply.

    I do not see an option to remove slashes, only what’s in the screenshot. (Apostrophes and quotes, Ampersands, Decimal separators)

    https://snipboard.io/EAYtL0.jpg

    Will the plugin support removing of slashes in these options or in a future version?

    Plugin Author Mikko Saari

    (@msaari)

    To remove slashes, you can add this to your theme functions.php:

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

    (@simplepowerit)

    Thank you @msaari.
    That seemed to do the trick!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘hypens, dashes, and slashes’ is closed to new replies.