Při registraci oblasti widgetu používám následující:
if ( function_exists('register_sidebar') )
register_sidebar( array(
'name' => __( 'Footer Widgets', 'hex'),
'id' => 'footer-widgets',
'class' => 'footer-widgets',
'description' => __( 'Widgets will appear in the blog, between the end of content and footer', 'hex' ),
'before_widget' => '<li class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>'
) );
A jak id
, tak class
jsou ignorovány, to, co dostávám, jsou pouze samotné widgety - horní prvek v oblasti widgetů je <li>
Vím, že to můžu jednoduše zabalit do index.php
, kde se widgety zobrazují, s div, ale není to možné?
Parametr id v registru_sidebar není přímo spojen s výstupem html. Používá se k identifikaci každého postranního panelu, když je postaven $ widget_object.
Třída by měla být přidána do značek before_widget.
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/widgets.php#L1128 je místo, kde třída bude analyzována.