WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
replace widget with different widget on certain page? (2 posts)

  1. Taipa
    Member
    Posted 3 years ago #

    Is this plugin able to control different widgets at the same time? Could I have one widget be told to not show up on certain pages, and have another widget only show up on those pages?

    I have this code:
    ! is_page( array( 5,6,7 ) )

    Which works great and deactivates that widget on those pages. However, I cannot get the reverse to work:
    is_page( array( 5,6,7 ) )
    I'd like this second widget to display when the first widget does not, but it seems like I'm doing something wrong. The first widget disappears on those pages, but the second does not show up.

  2. alanft
    Member
    Plugin Author

    Posted 3 years ago #

    is_page is certainly meant to work that way ok with array of page IDs:

    http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

    I don't know what to suggest to fix your problem, sorry.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic