Support » Plugin: Widget Logic » Operators not working

  • cdragin


    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.

Viewing 1 replies (of 1 total)
  • Plugin Contributor alanft


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

    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')

Viewing 1 replies (of 1 total)
  • The topic ‘Operators not working’ is closed to new replies.