WordPress.org

Ready to get started?Download WordPress

Forums

Different Sidebars? (8 posts)

  1. bk
    Member
    Posted 9 years ago #

    How can you have different sidebar on different pages? Like the content (text) and stuff.

    Thank you.

  2. XeroCool
    Member
    Posted 9 years ago #

  3. bk
    Member
    Posted 9 years ago #

    Hmm... okay. I'm kinda getting this. Sounds pretty easy.
    But where do I have to enter these tags?

    Do I have to use the code posted in Variable Sidebar Content? Replace it with my current code in sidebar.php?

  4. bk
    Member
    Posted 9 years ago #

    So, am I, right or wrong?

  5. Lorelle
    Member
    Posted 9 years ago #

    Well, I did the same thing and I spelled out how to do it here. That might help.

  6. bk
    Member
    Posted 9 years ago #

    But this works with only categories, right? Not pages?

  7. bk
    Member
    Posted 9 years ago #


    <?php
    $post = $wp_query->post;
    if ( in_page('9') ) {
    include(TEMPLATEPATH . '/sidebar_portfolio.php');
    elseif ( in_page('10') ) {
    include(TEMPLATEPATH . '/sidebar_archives.php');
    elseif ( in_page('12') ) {
    include(TEMPLATEPATH . '/sidebar_about.php');
    } else {
    include(TEMPLATEPATH . '/sidebar_normal.php');
    }
    ?>

    That's what I am putting. Is it right?

  8. bk
    Member
    Posted 9 years ago #

    I think I got it working. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.