Support
Support » Fixing WordPress » register_sidebar ignores 'id' and 'class'
(@ilya22)
11 years, 8 months ago
I am using the following to register a widget area:
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>' ) );
And both id and class are ignored, what I get is only the widgets themselves – the top element in the widget area is the <li>
id
class
<li>
I know I can simply wrap it in the index.php, where the widgets show, with a div, but isn’t this suppose to do it?
index.php