2HousePlague I AM THE BRIDGE -- @

Joined: 28 Jun 2005 Posts: 471 Location: san.francisco
|
Posted: Fri Jul 21, 2006 6:53 am Post subject: Wordpress Sidebar Trick |
|
|
In the default Wordpress theme, the single post page does not normally display the sidebar. After a friend asked me to mod his blog a bit and try to put some of the sidebar elements on the single post page, I found a way to do this that was pretty easy.
First, you have to go the index.php template and copy (do not delete) this line from near the top:
| Code: |
<div id="content" class="narrowcolumn"> |
This is the CSS class that divides the page into 2 cloumns.
Then go to single.php and replace the following line with the line above:
| Code: | | <div id="content" class="widecolumn"> |
That's it. Now you will have a sidebar next to your post on every single-post page.
You will notice, however that some of the elements that display on the sidebar on the front page do not display on the single-post pages. This is because the sidebar.php has several conditional statements that determine what elements of the sidebar are displayed on other types of pages, like archives. You can modify or remove these conditional elements to control what you see on the single-post page.
2hp _________________
 |
|