WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the twenty-eleven theme and every page (except the 404) has a sidebar. However the post permalink page (/2011/11/post-name/) does not. How do i put the sidebar onto it? I tried looking for its php file on codex but it is very unclear which file is the correct one.

share|improve this question
up vote 1 down vote accepted

The template for the display of a single post is single.php

Add <?php get_sidebar(); ?> in the second last line of that file just above <?php get_footer(); ?> and the sidebar will show.

Note: This will get overwritten, if you ever update the theme.

share|improve this answer
This work but i'll also add that i have to comment out all the .singular css rule. – acidzombie24 Nov 16 '11 at 1:57

Without looking in the theme folder for Twenty-Eleven, my guess is you need to alter the template file titled "content-link.php"...or whichever one that theme uses to display that page.

Then either create a custom sidebar template, or simply link the existing one itself by using: <?php include ('your_new_sidebar_template.php'); ?>


Sorry I misinterpreted what you meant in your title...

Try this in your single.php template instead -

 * The Template for displaying all single posts.
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0

get_header(); ?>

        <div id="primary">
            <div id="content" role="main">

                <?php while ( have_posts() ) : the_post(); ?>

                    <nav id="nav-single">
                        <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
                        <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'twentyeleven' ) ); ?></span>
                        <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></span>
                    </nav><!-- #nav-single -->

                    <?php get_template_part( 'content', 'single' ); ?>

                    <?php comments_template( '', true ); ?>

                <?php endwhile; // end of the loop. ?>

            </div><!-- #content -->
        </div><!-- #primary -->

<?php get_sidebar(); ?><!-- This is what was missing in your single template...without testing this you may have to alter some of your css to appropriately accommodate this change assuming this does the trick -->
<?php get_footer(); ?>
share|improve this answer
Found it (content-single), no matter where i put it on the page its wrong. I then looked at content-page and found that it isnt even included. Its included outside of the file. So this doesnt help at all unforunately – acidzombie24 Nov 16 '11 at 1:34
Oh, your just trying to alter the single post template? I interpreted your title as a template that listed links or something...So you attempted to add the sidebar into the appropriate template file then (content-single.php) and it still didnt work? – Mr.Brown Nov 16 '11 at 2:15
i didnt -1 you but it did show up but not correctly. For example on one try i could not click anything on the menu (which was very weird) – acidzombie24 Nov 16 '11 at 2:16
I think you need to edit the single.php template instead. Ive edited my first response & commented out the added template tag for the sidebar. – Mr.Brown Nov 16 '11 at 2:22
Hey so I just tested it, and the sidebar will appear on single posts now in the Twenty Eleven theme however your going to need to do some additional legwork with renaming some containing divs as well as adding in some new CSS. – Mr.Brown Nov 16 '11 at 2:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.