WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
[resolved] Multiple conditions don't work (3 posts)

  1. madeleod
    Member
    Posted 1 year ago #

    Hi,
    Here is the code I would like to implement for one of my widgets.
    The first condition is working well.
    Not the others.
    Did I make something wrong?

    !is_home()|| !is_page('links') || !is_page('other')

    I've tried other syntax without success

    !is_home()|| !is_page('links', 'other')

    Thx for your help.
    Mad

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

  2. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    is_page doesn't take multiple parameters like that you have to pass it an array to do multiple values

    http://codex.wordpress.org/Function_Reference/is_page#Examples

  3. madeleod
    Member
    Posted 1 year ago #

    Thx! It works that way for is_page but still not for is_home() ||
    It should say && instead.
    Great team work
    Mad.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.