No sidebar menu inside posts of WP twenty eleven theme

asked Feb 27, 2013 in Website Builder by SunFun
I am using Twenty eleven theme, and I want to have the same sidebar I currently have in my Home page  inside my posts.  How can I add the sidebar to my posts? I already have a child theme that I added all my changes to.
Can anyone please help?

2 Answers

0 like 0 dislike
answered Feb 27, 2013 by WebProX
Remove all the CSS fixes and add the below line to the post template file
<?php get_sidebar(); ?>
0 like 0 dislike
answered Feb 27, 2013 by expert
here's what you need to do in your child theme:

1. add the below code to the function.php file
add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
    // Removes the filter adding the "singular" class to the body element
    // that does not allow for a sidebar
    remove_filter( 'body_class', 'twentyeleven_body_classes' );
    } the single.php file and right before the line <?php get_footer(); ?>
add this line <?php get_sidebar(); ?>