• I just downloaded and installed Widget Logic, and it seems to work alright, but I need learn to master the conditional tags. I tried to change the sidebar widget depending on a particular category of posts, but for any singular post withing that category. The category was “Writing” so I put as my option in the widget,
    is_category('Writing')
    I expected all individual posts within that category to have that specific widget. But that only worked in category view.

    I was thinking I could do something like:
    is_singular(array(is_category('Writing')))
    but I really have no idea what I’m talking about.

    Any ideas? Many thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter rghollenbeck

    (@rghollenbeck)

    Oops! I think I meant to say,

    is_single(array(is_category('Writing')))

    but I still have no idea what I’m talking about.

    This is some pretty powerful stuff, but it will take me a while to learn it.

    I sure would appreciate some help.

    I’m trying to control the widgets within all single posts from a specific category. I hope this clarifies my question.

    Thanks so much for any help offered.

    for single posts, try to use
    in_category()
    or the combination
    is_single() && in_category()

    http://codex.wordpress.org/Conditional_Tags

    Thread Starter rghollenbeck

    (@rghollenbeck)

    Thank you. I’ll try that after I get WordPress up and running again after I screwed it up.

    My installation is in a subfolder with the root index.html as the home page. That was causing problems and all my links started going back to the root homepage. So I changed the site URL to the root like a dummy and crashed the WordPress installation. Now I’m trying to find the file to edit to get WP to load again.

    Thread Starter rghollenbeck

    (@rghollenbeck)

    Yes, that in_category() was EXACTLY what I was looking for! With the extensive overuse of categories, we can make really customized widgets

    Thanks so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘is_category() appears only to apply to category view,’ is closed to new replies.