Adding sidebars on the left
April 18th, 2008
The first crack at this is quite simple really.
You add the includes for the three sidebar PHP files into the usual files (ie archive.php, index.php, page.php, search.php and single.php), create the three new sidebars in functions.php and you’re away.
That does actually work as you can see. However, there are a couple of problems which it creates. First, we have the main text running right over the dress but more importantly any empty sidebars on the lefthand side still take up space.
In fact, at the moment empty sidebars on the right also take up space but you don’t notice that as the space used is off the side of your screen but in the case of those on the left the empty space moves the main text over to the right. I’ve cheated a little in that we renamed SidebarRight1.php (the original Kubrick sidebar) as SidebarLeft1.php so that when I removed all the content from the first right hand sidebar, there wasn’t the usual default content that the Kubrick theme provides.
You’re probably thinking that I could just set the width of the left sidebars to “auto” and the problem would go away. That works to some extent but “auto” sets the width of the column to the size required by the longest string of text so it would work if the content was just the Meta stuff but doesn’t work if it’s, say, the recent posts. Also, there’s the problem of the margin: even though there is currently no content in the left sidebars, that margin is enough to shift the blog text over to the right.
To fix that problem what’s needed is to make a small change to sidebarLeft1, 2 and 3 and corresponding changes in the stylesheet to allow for a zero margin and zero width sidebar when there’s no content. You could make the same changes in the sidebarRight1, 2 and 3 but that’s not necessary as empty right hand sidebars don’t affect the layout of this theme (yet).
Copyright © 2008 by SevaTeem Ltd. All rights reserved.




Whilst I’m only planning to run with two sidebars myself, it’s very easy at this point to add a lot of flexibility in courtesy of the widget facility.
This is surprisingly easy once you get your head around the widget facility in Wordpress.
At first glance, this seems to be amongst the easier things that you can do.
To get the background image applied across the whole page, you need to dive into the CSS and remove all the sections that kill it off by specifying the the background image is set so some specific colour. You also need to set the margin and padding to zero for the page as otherwise there’s an annoying offset effect where the central column is a little bit lower than the two columns to the side.
It’s way too much hassle to design a new theme and use it on the main blog so this blog will be serving as the testbed for my new theme. That probably means that it’ll look pretty weird a lot of the time!