当您将其定义为函数时,可以在侧栏中添加类前和类后。php。
<?php $args = array(
\'name\' => __( \'Sidebar name\', \'theme_text_domain\' ),
\'id\' => \'unique-sidebar-id\',
\'description\' => \'\',
\'class\' => \'\',
\'before_widget\' => \'<li id="%1$s" class="widget %2$s">\', //You can change class/id here
\'after_widget\' => \'</li>\',
\'before_title\' => \'<h2 class="widgettitle">\',
\'after_title\' => \'</h2>\' ); ?>