Monday, August 10, 2009

Adding A New Sidebar - An Idiot's Guide

The last tutorial was hanging like shit. So now (after spending quite some time), I present my (humble) tutorial on how to add sidebars and rearrange the widgets in your blog.

I am also introducing my Guinea pig blog. ;)



The original script for 'main' and 'sidebar' is as below.



Change the following lines





to



and



Add these new lines after the above lines for the new sidebar.



The HTML will look something like this



If you preview your blog, it will look something similar to this



The sidebar is empty. We have yet to place widgets in the new sidebar. And now comes the rearranging part. First, find the following lines.



and add these new lines before or after the above lines (depending on your sidebars arrangement).



In this tutorial, I'm placing the 'About Me' and 'Followers' widgets (originally in the existing sidebar) in the new sidebar. Cut the lines as shown below.



And paste as the following



And now...

Tadaaaaaa!