when I installed WordPress theme twenty eleven then I found that there is no sidebar option in single posts, tags or in even archive options. I felt the need for it in order to make my theme more beautiful and attractive.
I did some modification in its PHP code and have a sidebar in each option or where ever I felt its need?
I want to share with you, just stay with me.
How to add sidebar in Twenty Eleven WordPress Theme:
Go to admin panel >>>.click on the edit option under Appearance..then >>> open up your single.php template and find the call for the footer:
php get_footer(); ?>
You simply need to add a call to the sidebar above this function like this:
php get_sidebar(); ?>
You should repeat the above step in your page.php template if you want to add a sidebar to your pages too.
The last thing you need to do is open your functions.php template then go to the bottom of the template and remove the function from line 581 to 592 (you should the file in some editor like Notepad ++, you can download this one from the web)
twenty eleven_body_classes. Bart advises that you simply comment the code out so it can be added later however I don’t think there’s any need as long as you have a back up of Twenty Eleven on your computer.
That is all you have done .you can add the sidebar function where ever you want.