WordPress.org

Ready to get started?Download WordPress

Forums

Most And Least Read Posts Widget
[resolved] Error on exclude word function (2 posts)

  1. vignes.thomas@yahoo.fr
    Member
    Posted 1 year ago #

    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://wordpress.org/extend/plugins/most-and-least-read-posts-widget/

  2. whiletrue
    Member
    Plugin Author

    Posted 1 year ago #

    You're right! I'm updating the plugin in minutes. Thanks for your support!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.