Add sidebar to post view in Twenty Eleven theme

By default Twenty Eleven doesn’t display a sidebar on the post view page, but this can be added fairly easy. describes how this can be done by editing CSS.

I ran into a few issues doing it this way. Using this method when the single column layout is selected, pushes the content to the left without a sidebar showing, it also causes issues with the edit post link and the author Bio if active, there may be other areas not displaying right. These can easily be fixed by adjusting the css.

That might not effect most users, but since I usually allow downloads of child themes I make I needed a better way.

The method I used curtsey of worked best with very few issues. (slight css edit for next/previous links and resize author bio)

Start off by creating a child theme, this is always the best way to go I don’t care who says it isn’t.

Open single.php and near the bottom add

right above

Now create a functions.php file for your theme and add this to it

Here are a few css adjustments I added, the nav next/previous one is really all that’s needed though.

Now your site should display a sidebar properly using any layout.

57 thoughts on “Add sidebar to post view in Twenty Eleven theme

  1. Great, but is it possible that message trouble to be linked to the modificaiton in functions.php file…

    Warning: Cannot modify header information – headers already sent by (output started at /homez.359/acrthuey/www/wp-content/themes/twentyeleven-child/functions.php:224) in /homez.359/acrthuey/www/wp-includes/pluggable.php on line 866

Leave a Reply