我使用以下内容注册小部件区域:
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>\'
) );
两者都有
id
和
class
被忽略,我得到的只是小部件本身-小部件区域中的顶部元素是
<li>
我知道我可以简单地用index.php
, 小部件显示在哪里,带有一个div,但这不是应该做到的吗?