Title: [Plugin: Widget Logic] Exclude all pages, except specific pages?
Last modified: August 20, 2016

---

# [Plugin: Widget Logic] Exclude all pages, except specific pages?

 *  [CBKat](https://wordpress.org/support/users/sohkat/)
 * (@sohkat)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-exclude-all-pages-except-specific-pages/)
 * I know to get widgets to show up on specific pages I put:
 * > !is_page( array( ID#, ID#, ID# ) )
 * But how do I instead exclude pages? For example, I want some ads only on 3 out
   of 100 pages, so I don’t want to put 100 ID’s in there. Is there a way to do 
   this? I thought it would be by using
 * > !is_single( array( ID#, ID#, ID# ) )
 * But that is not working. Any suggestions, or is this not possible?
 * [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/)

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

 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-exclude-all-pages-except-specific-pages/#post-2941837)
 * to exclude pages !is_page(array(X, Y, Z)) should work find. (I’m guessing the!
   in your top line of code was an accident)
 *  Thread Starter [CBKat](https://wordpress.org/support/users/sohkat/)
 * (@sohkat)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-exclude-all-pages-except-specific-pages/#post-2941895)
 * No, it doesn’t work unless I keep the “!”
 * And I want to exclude all pages except for specific ones. With 100+ pages to 
   exclude one by one that would be a mess. . .
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-exclude-all-pages-except-specific-pages/#post-2941914)
 * is_page(array(X, Y, Z))
    will make a widget appear on page X or page Y or page
   Z
 * !is_page(array(X, Y, Z))
    will make a widget appear when it is none of the same
   pages

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

The topic ‘[Plugin: Widget Logic] Exclude all pages, except specific pages?’ 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
 * 2 participants
 * Last reply from: [alanft](https://wordpress.org/support/users/alanft/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-widget-logic-exclude-all-pages-except-specific-pages/#post-2941914)
 * Status: not resolved