Support » Plugin: Most And Least Read Posts Widget » Error on exclude word function

  • Resolved



    I think i’ve detected an error on the function “Exclude post whose title contains any of these words (comma separated):”.

    Indeed if i choose two excluded words (wordA,wordB) the generated request looks like :

    ( p.post_title not like '%wordA%' or p.post_title not like '%wordB%')

    Or it has to be :

    ( p.post_title not like '%wordA%' AND p.post_title not like '%wordB%')

    To resolve this change :

    line 133
    $sql_esc = " and ( ".implode(" or ", $sql_esc_arr).") ";


    $sql_esc = " and ( ".implode(" and ", $sql_esc_arr).") ";


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error on exclude word function’ is closed to new replies.