• Resolved [email protected]

    (@vignesthomasyahoofr)


    Hi.

    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).") ";

    by

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

    Regards

    http://ww.wp.xz.cn/extend/plugins/most-and-least-read-posts-widget/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Error on exclude word function’ is closed to new replies.