How to display sidebar in every WordPress post

As times goes by, I will change my WordPress Theme bit by bit over time, improving my site design, layout and features. Today, I am going to display the sidebar in every of my blog post.

What is a sidebar? Sidebar is like the menu bar either on your left or right side of your blog posts(depends on where you place it). The default WordPress theme display the sidebar only on your main front. Well this means , your sidebar information such as your ads and category will not be display when viewing a individual blog post in your WordPress blog.

To change this, go to your theme editor in your WordPress admin portal. Edit the single.php file.

  1. On the top of the file about the 2nd line, change
    ‘<div id=”content” class=”widecolumn”>’ to
    ‘<div id=”content” class=”narrowcolumn”>’
    This will position your blog post into a smaller column, giving space to the sidebar to be displayed
  2. At the bottom of the file, add in <?php get_sidebar(); ?> just above the line ‘<?php get_footer(); ?>’
  3. So you should update the file and check your Blog site.

Just a simple tip to help bloggers with their WordPress:D

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Slashdot
  • StumbleUpon
  • Reddit
  • Live
  • Technorati
  • TwitThis
  • YahooMyWeb

Tags:

2 Responses to “How to display sidebar in every WordPress post”

  1. Hani Says:

    I thought it’s automatic?

  2. alientyc Says:

    If we use the default WordPress theme by Michael Heilemann, sidebar does not appear by default on every post at least on the few blog sites I use :D

    Congrats, you are the 2nd person to comment on my blog! The 1st was a spammer.
    Sorry, no budget for prize yet.

Leave a Reply