Wordpress 2 Widget sidebars
- 6th Jul 2007
- Leave a Comment
- Wordpress
Ok on David Naylor I hope you noticed the 2 widget sidebars, well here is the code:
in your Theme’s function.php
[php]if (function_exists(”register_sidebar”)) {
register_sidebar(Array(”name” => “sidebar”));
register_sidebar(Array(”name” => “sponsors”));
}[/php]
Then in your template to add for column 1
[php]
< ?php if (!function_exists('dynamic_sidebar') or !dynamic_sidebar("sidebar")) { ?> etc.. < ?php } ?>
[/php]
and likewise for column 2
[php]
< ?php if (!function_exists('dynamic_sidebar') or !dynamic_sidebar("sponsors")) { ?> etc.. < ?php } ?>
[/php]
screen shoot for Admin panel on it
![]()
DaveN






3 Comments | Leave a comment »
Hi Dave,
Is there a wordpress plugin you used to display code in this post?, I am new to blogging but want to put code samples up in wordpress.
If you could let me know I’d be much obliged
Brad
Detailed instructions but i wasn`t able to get it to work. Any luck with the plugin Brad??
This is great, but when you say ‘Then in your template to add for column 1′, what template do you mean? Which file do you edit here?
Thanks.