WordPress.org

Ready to get started?Download WordPress

Forums

swaping menus depending on which category your on (1 post)

  1. baronvoncake
    Member
    Posted 7 years ago #

    Hi,
    Im trying to swap between 2 menus depending on if your viwing category 2 + if your viewing a child of category 2 use sidebar2.php else use sidebar.php

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

    i can get it partly to work but it does not care it seems to work randomly.
    also im using Aquarium 1.0 as a base theme.
    link: http://www.yomo-interactive.co.uk
    cheers
    Lee

Topic Closed

This topic has been closed to new replies.

About this Topic