Widget Logic
is_category() appears only to apply to category view, (5 posts)

  1. rghollenbeck
    Posted 4 years ago #

    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,
    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:
    but I really have no idea what I'm talking about.

    Any ideas? Many thanks!

  2. rghollenbeck
    Posted 4 years ago #

    Oops! I think I meant to say,


    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.

  3. Michael
    Part-Time Forum Moderator
    Posted 4 years ago #

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


  4. rghollenbeck
    Posted 4 years ago #

    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.

  5. rghollenbeck
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic