wordpress小部件标题出现在li标签中

时间:2013-05-12 13:24:41

标签: wordpress widget

我的小部件栏中的标题不断出现在li标签内。我该如何解决这个问题。我检查了wordpress,我无法找到答案

if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',

));
}
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Homepage Sidebar',
'id' => 'homepage-sidebar',
'description' => 'Appears as the sidebar on the custom homepage',
'before_widget' => '<div style="height: 280px"></div><li id="%1$s" class="widget       %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));

}

1 个答案:

答案 0 :(得分:0)

试试这个

register_sidebar( array(
        'name' => __( 'Single Widget Area', 'twentyten' ),
        'id' => 'single-widget-area',
        'description' => __( 'The single widget area', 'twentyten' ),
        'before_widget' => '<div id="%1$s" class="widget-container %2$s">',
        'after_widget' => '</div>',
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ) );