SEO Services
Home >> Webmaster Forums >> Adding the Sidebar to Single.php

Adding the Sidebar to Single.php


Darren said: "Adding the Sidebar with the links to the default Wordpress themes is a good idea. It allows spiders and visitors to navigate easily to other sections of the site and network, if they land there from a search engine. Here's how to edit it. Open up single.php and change [code]
[/code] To: [code]
[/code] And right at the end, add [code] [/code] Right before: [code] [/code] This will help build link popularity, as each time any of posts, we automatically add 7 links to the other sites in the network. This should make it very easy for new posts to be picked up, especially as we begin posting rapidly."

chris3471 said: "Now that's great, I've always been annoyed by not having any way to navigate to other parts of the blog from single posts."

Darren said: "I'm implementing it now. It looks professional too."

quinny said: "ok... i added it but i'm getting two different sidebars? ...the one on single is an edited one that I did but changed it back again... Any idea's whats coming on here?"

Darren said: "Make sure "get_sidebar()" is only included once. Show me a page if you get the error. One other modification has to be made so the links show up right. In sidebar.php Find: [code] [/code] Change it to: [code] [/code]"

quinny said: "ya, got the links now! only background colour for the side bar is white ..where do you change that so it's the same as the main page?"

Darren said: "In style.css you add it to the div for #sidebar [code] #sidebar { font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; background-color: #DDD; } [/code] You can use any color you like. [url]http://www.colorschemer.com/online.html[/url] Check them out for Hex codes."

quinny said: "i'm not getting any change to the colour... have I gone wrong somewhere?"

Darren said: "You added that line to the stylesheet?"

Darren said: "It's not in there: Yours says: [code] #sidebar { font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; } [/code] Add the: [code] #sidebar { font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; background-color: #DDD; } [/codee] bit about the background color between the curly brackets. This is in style.css, which I believe you can edit in the Admin panel as well."

chris3471 said: "You sure you're editing the same theme that you're using? Also I've found that sometimes you have to click shift+refresh on the browser to reload the images before you see the changes. Might be control+refresh, I can never remember which."