This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Exclude certain characters of the search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Exclude certain characters of the search

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5797
    Olivier LecomteOlivier Lecomte
    Participant

    Thank you for your great plugin !

    I use the plugin in French (version 4.5.1 the latest version ),
    and I have a problem with special characters for example :
    – dabord
    our
    –lactivité
    The character is blocking the search.

    But the word “abord” or ” activité” only works well !

    There is there a way to exclude certain characters of the research?

    Thank you

    #5800
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I think you are using a different apostrophe character there.

    If you try the l’activité or d’abord it’s going to work.
    The ’ apostrophe is not same character as the ‘.

    I’ve logged in with the FTP account and created a filtering function to replace the incorrect apostrophe automatically for you. It took me a while, because the functions.php file was in an incorrect encoding, but I fixed that for you as well. The code I appended there for future reference:

    [code]
    // An extra function for fixing the apostrophes for Ajax Search PRO
    add_filter(‘asp_search_phrase_after_cleaning’, ‘asp_fix_apostrophe’, 1, 1);

    function asp_fix_apostrophe( $s ) {
    $s = mb_ereg_replace("’", "’", $s);
    return stripslashes($s);
    }
    [/code]

    This code remains after updates as well, you don’t have to worry 🙂

    #5801
    Olivier LecomteOlivier Lecomte
    Participant

    Thank you so much for your great support !!! Big up !

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.