Support » Fixing WordPress » register_sidebar ignores 'id' and 'class'

  • 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>

    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?

  • The topic ‘register_sidebar ignores 'id' and 'class'’ is closed to new replies.