I have registered 3 sidebars (plus one more footer sidebar):
if ( function_exists('register_sidebars') )
register_sidebars(3, array(
'name' => 'Sidebar %d',
'before_widget' => '<div id="%1$s" class="widget_style"><div class="side_left">
<div class="side_right">
<div class="side_top">
<div class="side_bot">
<div class="left_top">
<div class="right_top">
<div class="left_bot">
<div class="right_bot">',
'after_widget' => '</div>
</div>',
'before_title' => '<p class="widget_title">',
'after_title' => '
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="inside_widget_2">',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer Widgets',
'before_widget' => '<div id="%1$s" class="widget_style"><div class="side_left">
<div class="side_right">
<div class="side_top">
<div class="side_bot">
<div class="left_top">
<div class="right_top">
<div class="left_bot">
<div class="right_bot">',
'after_widget' => '</div>
</div>',
'before_title' => '<p class="widget_title">',
'after_title' => '
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="inside_widget_2">',
));
(sorry for all the <div> glop in there, but it works)
and then I try to call just one sidebar in the sidebar.php file using:
<?php if ( !function_exists('dynamic_sidebar')
|| !pick_sidebar() ) : endif; ?>
The pick_sidebar() function I created in the functions.php file:
function pick_sidebar() {
if (is_home()) {dynamic_sidebar('Sidebar 1'); }
elseif (is_page()) {dynamic_sidebar('Sidebar 2');}
else {dynamic_sidebar('Sidebar 3');}
}
This works fine, and I can get different widgets and everything at the right places (haven't tested extensively, though).
My problems is that when I go to add widgets, I can only add one "pages" widget TOTAL for ALL of the sidebars, not to each sidebar. I want to be able to add a pages widget to each of the sidebars. What am I doing wrong?
p.s. I'm new to PHP