WordPress.org

Support

Support » Plugins and Hacks » How can I display pages and categories and also hide some widgets

How can I display pages and categories and also hide some widgets

  • I have widget logic installed.

    What I want to do is:

    I have 2 widgets that show on sidebar.

    I want to show one widget on some pages… let’s say IDs:1,2,3

    I also want to show some categories at the same time let’s say IDs 4,5,6

    How can I combined them at the same time to show and also hide.

    I have tried this and it works

    is_page(array(1,2,3))
    !is_page(array(1,2,3))

    but I don’t know how to add the categories at the same time.

    I have tried something like this and it didn’t work

    is_page(array(1,2,3)) || is_category(4,5,6)

    Thanks for your help

  • The topic ‘How can I display pages and categories and also hide some widgets’ is closed to new replies.