April 19, 2008

How to Add Sidebar in Single Post Pages With PlainTxt Wordpress Theme


The PlainTxtBlog Wordpress theme is one of my favorites. However, under the hood, it's totally confusing for new users. I was trying to figure out how to get the sidebar to appear on Single Post pages, which are the permalink pages that people mostly come across from a search engine. The sidebar just wasn't there--so frustrating. I'm not sure why the author left it out.

I actually contacted the author for help and thanked him for the wonderful theme. He responded that he does not supply support for his themes (understandable) and directed me to the readme file, which did me no good. After about a month of searching, I think I figured it out. Here's what you got to do.

First, go to your Wordpress theme editor and access the single post php page (it will be called single.php). Go to the bottom of the code and add the following line just before the code. Now, go to your style.css page and delete this line:

body.single div#container,body.page div#container{margin:0 0 2em;}



Now, click on a permalink (single post) page and the sidebar should appear.


*Update* In some versions of the PlainTxtBlog style, the sidebar is suppressed in the style.css page by the display:none attribute. Open the style.css page, do a search for sidebar, and find the style instructions that say display: none. Remove the body.single sidebar text from that set of instructions. The sidebar should now appear on the single page.

No comments: