• Resolved csumrell

    (@csumrell)


    Hi,

    I am using the plugin on a woocommerce build with a lot of products. Their names are usually hyphenated such as E-7S or NH-201. I have configured it to where searching E-7S or E 7S (or NH 201, NH-201) will show results. However if the user searches something like E7S or NH201 (without space or dash) then it shows no results. Is there any way to get this to work without the space or dash? I have already tried synonyms and it didn’t seem to work (Example “e7s=e-7s”)

    Thank you for your time

    https://wordpress.org/plugins/relevanssi/

Viewing 1 replies (of 1 total)
  • Thread Starter csumrell

    (@csumrell)

    nvm, did a search in the meantime and this solved my problem

    add_filter(‘relevanssi_remove_punctuation’, ‘hyphensoff’, 9);
    function hyphensoff($str) {
    return str_replace(‘-‘, ”, $str);
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Dealing with Hypens (-)’ is closed to new replies.