WordPress.org

Forums

[closed] show different sidebar depending on which current category and child (2 posts)

  1. baronvoncake
    Member
    Posted 8 years ago #

    Hi,
    im trying to swap 2 sidebar depending on which category the viewer is looking at (this includes the children of that category).
    This is what i have so far

    (category.php)

    <?php if (is_category('2') || in_category('2')) {
    include (TEMPLATEPATH . '/sidebar2.php');
    }else{
    include (TEMPLATEPATH . '/sidebar.php');
    } ?>

    it work only if your looking category 2, were i thought in_category picked up the children of the category.
    any ideas

  2. moshu
    Member
    Posted 8 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic