WordPress 3.3 default theme Twenty Eleven 1.3: How to display sidebar on article page?

Posted by NosaLee in WordPress Experience on 21-12-2011.

Author: Nosa Lee
Original Address: http://www.seeksunslowly.com/add-sidebar-wordpress-twenty-eleven-1-3
To reprint this article, please indicate the source, thank you.
_____________________________________

As you know, the latest version of WordPress (v3.3)’s default theme Twenty Eleven 1.3 does not display the sidebar on the article page by default.

If you are used to displaying sidebar always or you have put some important things on sidebar (such as categories, Google AdSense), you may think this is a unfriendly change in Twenty Eleven v1.3.

Search in WordPress’s appearance settings and the related settings of Twenty Eleven 1.3 thoroughly, no useful options found!


How to do? You can only change the WordPress code!

Specific steps as following:

1. Click “Appearance -> Editor” in WordPress control panel, and then click “Single Post (single.php)” on the right, add the following code before the last <?php get_footer(); ?> code:

1
<?php get_sidebar(); ?><?php get_footer(); ?>

2. Click “Stylesheet (style.css)” on the right and delete the following styles:

1
2
3
4
5
.singular #primary

{margin: 0;}.singular #content, .left-sidebar.singular #content

{margin: 0 7.6%;position: relative;width: auto;}

3. At this time, your blog can display the sidebar on the article page already, but the content area is so small, so you need to delete the following styles in style.css:

1
2
3
4
5
6
7
.singular .entry-header,

.singular .entry-content,

.singular footer.entry-meta,

.singular #comments-title {margin: 0 auto;width: 68.9%;}

4. Now, the content area is normal, if you want to adjust the size of comment area, just modify the following styles in style.css (please note following two numbers):

1
.commentlist .avatar {......left:-90px;...}.commentlist {list-style: none;width: 85%

Congratulations! Now, the sidebar is appeared on all article pages again!

Post a comment