WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
[resolved] Problem with && (3 posts)

  1. Repka
    Member
    Posted 1 year ago #

    Hello,

    I use code
    is_home() && is_category()

    and it doesn't work.

    But works separately:
    is_home()
    or
    is_category()

    What is wrong?

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

  2. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    unless your home page is also a category page (which I'm not sure is even possible), that's never going to be true.

    if what you want is it to be true when it is_home OR it is_category, then use OR instead, ||

    then the widget will appear when the showing page is your home or when it is a category

  3. Repka
    Member
    Posted 1 year ago #

    alanft,

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.