WordPress: Add more than one sidebar
Posted: July 10th, 2009 | Author: Bernhard | Filed under: Wordpress | 2 Comments »In wordpress it is possible to create multiple ‘sidebars’ with widgets on custom places in your template. To register a new sidebar open functions.php in your template folder (or create one), add:
if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'SIDEBARNAME', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '', ));
Explaination of the array() :
‘name’ = name of your new sidebar
‘before_widget’ = Add a html element before you start your widget (eg. <div class=”widget”)
‘after_widget’ = close the element you started above
‘before_title’ = Add a html element before your widget title (eg. <h3>)
‘after_title’ = close the element you started above
Now al you have to do is add your new sidebar to your place in your template, add:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('SIDEBARNAME') ) : ?> This is what shows when no widgets are added. <?php endif; ?>


It is really very useful, this is what I am searching. Thanks for the posting
That’s way more clever than I was exepictng. Thanks!