to clear the confusion up, when I said in my first post “I’m working on a WordPress theme” I meant that I’m developing one, as in creating one myself so I can put it on market places.
If you’re developing your own Theme, simply register however many sidebars you want, and then wrap appropriate conditionals around your calls to dynamic_sidebar()
.
For example, in functions.php:
register_sidebar(array( // Blog widget area
'name'=>'sidebar-blog',
'description' => 'Widget area for the blog.',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="title widgettitle">',
'after_title' => '</div>',
));
register_sidebar(array( // Front Page widget area
'name'=>'sidebar-front-page',
'description' => 'Widget area for the Front Page.',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<div class="title">',
'after_title' => '</div>',
));
Then, in sidebar.php:
if ( is_front_page() && ! dynamic_sidebar( 'sidebar-front-page' ) ) {
// This will output the Front Page Widget area
} elseif ( is_home() && ! dynamic_sidebar( 'sidebar-blog' ) ) {
// This will output the Blog Widget area
}
(Note: use whatever conditionals are appropriate for your use case. This is just an example.)