转到functions.php 在主题内归档并搜索register_sidebar
可能是这样的:
function isola_widgets_init() {
register_sidebar( array(
\'name\' => esc_html__( \'Sidebar\', \'isola\' ),
\'id\' => \'sidebar-1\',
\'description\' => \'\',
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h2 class="widget-title">\',
\'after_title\' => \'</h2>\',
));
}
add_action( \'widgets_init\', \'isola_widgets_init\' );
并将其更改为,例如:
function isola_widgets_init() {
register_sidebar( array(
\'name\' => esc_html__( \'Sidebar\', \'isola\' ),
\'id\' => \'sidebar-1\',
\'description\' => \'\',
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h2 class="widget-title">\',
\'after_title\' => \'</h2>\',
) );
register_sidebar( array(
\'name\' => esc_html__( \'Sidebar 2\', \'isola\' ),
\'id\' => \'sidebar-2\',
\'description\' => \'\',
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h2 class="widget-title">\',
\'after_title\' => \'</h2>\',
) );
}
add_action( \'widgets_init\', \'isola_widgets_init\' );