Forums

Different Sidebars in Single Post? (7 posts)

  1. aresem
    Member
    Posted 10 months ago #

    hi,

    i'm having a problem thats been urking me for the last little while. in single posts, my sidebar is the same as the sidebar on the main blog page. how do i customize my single post sidebar? i've been looking right and left and have tried a million things but nothing seems to work.

    the reason i need my single post sidebar to be customized is because the sidebar seems to run on too long if i'm posting short posts, thus causing my page to look.. well... weird. to further illustrate my problem, i posted a picture below. someone PLEEEEASE help me!

    http://aresem.com/images/sidebar_problem.JPG

  2. roya khosravi
    Member
    Posted 10 months ago #

    1. create a new sidebar, call it sidebar-something.php
    2. in single.php add : <?php get_sidebar('something'); ?>

  3. roya khosravi
    Member
    Posted 10 months ago #

    Correction :
    1. create a new sidebar, call it sidebar-something.php
    2. in single.php
    replace <?php get_sidebar(); ?>
    by
    <?php get_sidebar('something'); ?>

  4. aresem
    Member
    Posted 10 months ago #

    sorry.. i'm a total newb. how do i create a new sidebar php?

  5. MichaelH
    moderator
    Posted 10 months ago #

    Copy your existing sidebar.php to sidebar-something.php and then edit as suggested.

    Resources:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  6. aresem
    Member
    Posted 10 months ago #

    edit

  7. aresem
    Member
    Posted 10 months ago #

    ok i replaced the original sidebar.php with the new one and now i get 2 sidebars...

    http://aresem.com/images/sidebar_problem2.JPG

Reply

You must log in to post.

About this Topic