WordPress Theme Twenty Eleven: Add Sidebar to Single Posts

WordPress Theme Twenty Eleven: Add Sidebar to Single Posts


The default WordPress Twenty Eleven Theme that I use on this site by default does not have a sidebar on single posts.

The single posts will go from the example of the left to the right example



There is a plugin that will do this all for you. Use Twenty Eleven Theme Extensions instead



You will need to edit two files for the theme. You can do this in two ways:

1. Edit the files directly in


2. Go to the wordPress admin panel under Appearance>Editor option

WordPress Appearance tab


Firstly edit single.php

at the bottom of the file change the following

to this instead

Now if you look at a single post you will see the sidebar has appeared but not in line.



Next you will need to edit functions.php

Go to the bottom on the file and find the following line

add_filter( 'body_class', 'twentyeleven_body_classes' );

Now comment this out

/** add_filter( 'body_class', 'twentyeleven_body_classes' ); */

Now the sidebar will be correctly aligned

single sidebar