Support » Plugins » How do I get the sidebar on the post viewing page?

  • Hi,

    Maybe I am missing something really easy, but how do I get my sidebar to show up on the “posts” (as apposed to only the home page).
    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • if you look in index.php, you will see this somewhere;
    <?php get_sidebar(); ?>
    index.php is used for pages and home page, where as for posts, single.php is used.

    Open up single.php, and insert the same line of code above in the same place as it is in the index.php file.

    so if in index.php, the code comes after <div id="wrap"> for example, put it in the same place.

    Hi,
    Thanks for the quick reply. I tried that but it didn´t work. I think I tried inserting the code on almost every line of the single.php page and it didn´t work… shouldn´t this be really easy singe everyone has a sidebar on there posts page?

    thanks

    hmmm, not sure why that doesn’t work.

    I know its simple, but ive made these mistakes before…
    Are you editing the right theme?
    Making sure you save properly?
    Refreshing your browser?

    if we see a link to your site it might help to diagnose.

    it might be that you don’t have a conventional sidebar.php, and need a different call. I presume though that you use get_sidebar in index.php?

    Hi,
    Yes, I am editing the right theme because the sidebar does show up… but either as a long bar on top (before) the post of on the bottom (after) the post but not on the right hand side alongside the post. The blog is dinheirooportunidade.com
    Thanks for your help!

    ok, hopefully this should work.

    You are using the K2 theme, which when viewing a page, has a content class of narrowcolumn, but when viewing a post has widecolumn. So why your sidebar is either above or below the post is cause there isnt enough width.

    If you open single.php and look at this line at the top
    <div id="content" class="widecolumn"> , replace widecolumn with narrowcolumn.

    <div id="content" class="narrowcolumn"> is how it should now be in single.php too.

    Thank you! That did the trick!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I get the sidebar on the post viewing page?’ is closed to new replies.