Title: Error on exclude word function
Last modified: August 20, 2016

---

# Error on exclude word function

 *  Resolved [vignes.thomas@yahoo.fr](https://wordpress.org/support/users/vignesthomasyahoofr/)
 * (@vignesthomasyahoofr)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-on-exclude-word-function/)
 * 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/](http://wordpress.org/extend/plugins/most-and-least-read-posts-widget/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [whiletrue](https://wordpress.org/support/users/whiletrue/)
 * (@whiletrue)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-on-exclude-word-function/#post-3533593)
 * You’re right! I’m updating the plugin in minutes. Thanks for your support!

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/most-and-least-read-posts-widget/assets/icon-256x256.png?
   rev=1294899)
 * [Most And Least Read Posts Widget](https://wordpress.org/plugins/most-and-least-read-posts-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/most-and-least-read-posts-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/most-and-least-read-posts-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/most-and-least-read-posts-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/most-and-least-read-posts-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/most-and-least-read-posts-widget/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [whiletrue](https://wordpress.org/support/users/whiletrue/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/error-on-exclude-word-function/#post-3533593)
 * Status: resolved