WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
[resolved] Triple "OR" statement problem (4 posts)

  1. azazure
    Member
    Posted 3 years ago #

    I can't get the third condition to apply in the following statement:

    is_page(14) || is_category(array(11,12)) || (is_single() && in_category(array(11,12)))

    The first two conditions apply just fine. Any ideas? Thanks.

  2. Can you remove is_single? For a post to be tested against in_category it needs to be a single, right?

    Ref: http://codex.wordpress.org/Function_Reference/in_category

  3. azazure
    Member
    Posted 3 years ago #

    Thank you for responding, it was my fault. I have the same widget in both the right sidebar and the right inner sidebar and I was editing the wrong one. D'oh! Never do this stuff when you're tired and in a hurry.

  4. If you would please mark this thread as "resolved" (drop-down menu in the right column) it would be appreciated. Helps everyone keep better track of whose issues are still outstanding. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic