WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
Operators not working (2 posts)

  1. cdragin
    Member
    Posted 11 months ago #

    I am trying to keep a widget from showing up on any blog-related page, but to appear on all pages except for two. The code I have is
    !is_page( array( 'portfolio', 'branding' ) ) || !is_single() || !is_home()

    I have also tried
    is_page() && !is_page( array( 'portfolio', 'branding' ) )

    I can get any of the conditional tags to work by themselves, but do not seem to be able add others with operators.

    http://wordpress.org/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 11 months ago #

    first off see the FAQ for a 'gotcha' around using is_page…

    http://wordpress.org/plugins/widget-logic/faq/

    Then it sounds like your 2nd attempt *should* work. Try putting in the post IDs instead of names/slugs if you still can't get it right. If that doesn't work try a more basic 'all pages, but this one' logic like…

    is_page() && !is_page('portfolio')

Reply

You must log in to post.

About this Plugin

About this Topic