• Hi,

    I just purchased the pro version. Noticed that when I input keywords with containing apostrophe (‘s), ‘in’ and special chars like ( ) returns no result.

    Also it seems like overriding keyword search query in pre_get_posts does not apply as well. I am using:

    if ( !is_admin() && $query->is_main_query() ) {
    $query->set(‘s’,wp_trim_words($sanitized_keywords,9,’ ‘));
    }

    Please advise..thanks

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

    (@epsiloncool)

    Hi @joelrhd

    It’s strange situation with apostrophes. There is no special cases for them in the code, so words with them should be processed normally as well. I have doubts that WPFTS algorithm is active.

    Could you also explain what is #sanitized_keywords in your PHP example? And what is the goal for this code?

    Thanks!

    Thread Starter joelrhd

    (@joelrhd)

    HI @epsiloncoo,

    The sanitized keywords is just a variable I performed strip_tags to make sure users does not inout any html tags in the keywords. As well as limiting the keywords into 9 words. Should $query->set(‘s’ be the code to override the search quyery?

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi @joelrhd

    Well, I think your pre_get_posts hook (you are using it, right) should have a priority lower than 10 (for example, 5 or 1) to be called before native WPFTS hook, since it’s important that WPFTS should use your ‘s’ parameter value.

    That’s why I would like to see a whole code.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Keywords containing apostrophe (‘s) no result’ is closed to new replies.