查找文件的位置register_sidebar (必须位于主题文件夹或插件上)
将ID添加到侧栏
register_sidebar( array(
\'name\' => __( \'Main Sidebar\', \'theme-slug\' ),
\'id\' => \'change_me\', // Add only this line
\'description\' => __( \'Widgets in this area will be shown on all posts and pages.\', \'theme-slug\' ),
\'before_widget\' => \'<li id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</li>\',
\'before_title\' => \'<h2 class="widgettitle">\',
\'after_title\' => \'</h2>\',
) );
或者您可以在中禁用通知
wp-config.php 编辑WP_DEBUG 至false
define(\'WP_DEBUG\', false);