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

  • CBKat

    (@sohkat)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor alanft

    (@alanft)

    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)

    CBKat

    (@sohkat)

    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. . .

    Plugin Contributor alanft

    (@alanft)

    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.