Ecco come gestire in maniera avanzata le sidebar di Wordpress (grazie a SteveAgl che ha scritto su Wordpress Italy):
dovresti avere una cosa così in sidebar.php (ho aggiunto spazi a inizio di ogni riga dopo il <):
< div id="sidebar-1">
< ?php if ( function_exists(’dynamic_sidebar’) && dynamic_sidebar(’Sidebar1′) ) : else : ?>
Contenuto sidebar 1
< ?php endif; ?>
< /div>
< div id="sidebar-2">
< ?php if ( function_exists(’dynamic_sidebar’) && dynamic_sidebar(’Sidebar2′) ) : else : ?>
Contenuto sidebar 2
< ?php endif; ?>
< /div>
Ed in functions.php del tema (sempre spazi aggiunti):
< ?php
// Impostazioni Widget
if ( function_exists(’register_sidebar’) )
register_sidebar(array(
‘name’ => ‘Sidebar1′,
‘before_widget’ => ‘<div class="Categ1">’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’,
));
if ( function_exists(’register_sidebar’) )
register_sidebar(array(
‘name’ => ‘Sidebar2′,
‘before_widget’ => ‘<div class="Categ1">’,
‘after_widget’ => ”,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’,
));
?>
I div e glia ltri codici HTML poi dipenderanno da come fai il tutema e sevioo per i l CSS del tuo tema</code>
Ed ecco qui un altro paio di link a risorse utili sull’argomento:
- Automattic: widgetizing themes
- Marstonstudio.com: Differenti Sidebar in Diverse pagine

