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

Posted by Admin L in WordPress Experience on 21-12-2011.

Author: Nosa Lee
Original Address: https://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:
[cc lang=”php”]

[/cc]

2. Click “Stylesheet (style.css)” on the right and delete the following styles:
[cc lang=”css”]
.singular #primary

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

{margin: 0 7.6%;position: relative;width: auto;}
[/cc]

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:
[cc lang=”css”]
.singular .entry-header,

.singular .entry-content,

.singular footer.entry-meta,

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

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):
[cc lang=”css”]
.commentlist .avatar {……left:-90px;…}.commentlist {list-style: none;width: 85%
[/cc]

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

【赞赏 / Reward】

微信         支付宝         PayPal

Post a comment