• Hi,

    I am wondering if anyone knows a way I can have a different sidebar for each page. I want each page to have it’s own sidebar with different links in them.

    I am using the Blix theme.

    Thanks,
    Gary

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello

    Real simple!

    <?php /* If this is the homepage */ if ( is_home()) { ?>
    The content for the homepage
    <?php } ?>

    There are a ton of if’s you can choose from other than just is_home.

    Such as:

    <?php /* If this is the category 2 archive */ if ( is_category('2')) { ?>
    The content for the sidebar on the category 2 page
    <?php } ?>

    More info: https://codex.www.ads-software.com/Conditional_Tags

    Hope it helps!

    silfani

    (@silfani)

    I’ve been looking for a plugin implementation for this, whereas every page or even post would have two parts: the main content, and the sidebar content that may not necessarily have to be a sidebar as opposed to a floating box.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding sidebar to each page with different content’ is closed to new replies.