如果将类参数填充到register_sidebar 函数,然后将类提要栏{class name}添加到后端该提要栏的div中。
例如,如果使用以下代码注册侧栏:
register_sidebar(
array(
\'name\' => __(\'Footer Widget One\', \'wpbs-framework\'),
\'id\' => \'footer-01\',
\'class\' => \'testing\',
\'description\' => __(\'The first footer area\', \'wpbs-framework\'),
\'before_widget\' => \'<div class="footer-sidebar-widget">\',
\'after_widget\' => \'</div> <!-- end footer-sidebar-widget -->\',
\'before_title\' => \'<h4>\',
\'after_title\' => \'</h4>\'
)
);
然后在后端,您将看到边栏div具有“边栏测试”类,如下所示
<div class="widgets-holder-wrap sidebar-testing">