WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Widget Logic] Help with widget statement (4 posts)

  1. powerkor
    Member
    Posted 5 years ago #

    I am trying to figure out how to limit a widget to 2 parts of my site:

    1 - a 'fashion' page, which I can do

    but this one, isn't working, I need help with it.

    2- a single post that's category is fashion

    here is the statement I am using. The is_page() works, but the in_category does not.

    is_page('fashion') || (is_single() && in_category('fashion'))

    I am trying to do a !in_category('fashion') for those widgets that are only suppose to show when its not a fashion page and in_category('fashion') when it is a fashion page.

    Please help, I have no idea what Im doing wrong

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

  2. alanft
    Member
    Posted 5 years ago #

    your code looks good to me. no idea why that wouldn't be working. have you checked the obvious things in the http://wordpress.org/extend/plugins/widget-logic/faq/ ?

    if 'fashion' isn't working, try using the category ID instead.

  3. powerkor
    Member
    Posted 5 years ago #

    Yeah, I've tried that... I just found different plugin that does the same thing, but works. So thanks for your help.

  4. alanft
    Member
    Posted 5 years ago #

    oh well that's good.

    i wish i knew why it wasn't working for you though :-(

Topic Closed

This topic has been closed to new replies.

About this Topic