Title: Multiple Conditionals does not work
Last modified: August 21, 2016

---

# Multiple Conditionals does not work

 *  [WebEndev](https://wordpress.org/support/users/munman/)
 * (@munman)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/multiple-conditionals-does-not-work/)
 * When using ! is_singular( ‘post’ ) it works correctly by excluding the widget
   on single posts.
 * When using ! is_page( 77 ) it works correctly by excluding the widget on that
   page.
 * When using ! is_singular( ‘post’ ) || ! is_page( 77 ) together, it then does 
   NOT exclude the widget from EITHER single posts or page 77.
 * Any idea why it will not work when combining these conditionals?
 * Thanks
 * [https://wordpress.org/plugins/widget-logic/](https://wordpress.org/plugins/widget-logic/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [dEM0nsTAr](https://wordpress.org/support/users/dem0nstar/)
 * (@dem0nstar)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/multiple-conditionals-does-not-work/#post-4622244)
 * I have exactly the same problem with this logic:
 * `!is_page(140) || !is_single()`
 * Both work but not together.
 * Why and how to fix this?
 * Thanks
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/multiple-conditionals-does-not-work/#post-4622246)
 * you need to use `&&` to combine several conditions when using the negation `!`.
   
   example: `!is_page(140) && !is_single()`
 * you can check that for yourself by creating a boolean truth table for the combined
   condition; [http://en.wikipedia.org/wiki/Boolean_algebra](http://en.wikipedia.org/wiki/Boolean_algebra)
 *  [dEM0nsTAr](https://wordpress.org/support/users/dem0nstar/)
 * (@dem0nstar)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/multiple-conditionals-does-not-work/#post-4622247)
 * Thanks, that did the trick 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multiple Conditionals does not work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-logic_c8dde5.svg)
 * [Widget Logic](https://wordpress.org/plugins/widget-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-logic/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [dEM0nsTAr](https://wordpress.org/support/users/dem0nstar/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/multiple-conditionals-does-not-work/#post-4622247)
 * Status: not resolved