0

我的小部件栏中的标题不断出现在 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>',
));

}

4

1 回答 1

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>',
    ) );
于 2014-01-06T15:11:04.413 回答