How to avoid widgets added to sidebar on theme activation?

I am registering 3 sidebars on widgets_init

register_sidebar(array(
‘name’ => esc_html__(‘Left Sidebar’,’creatus’),
‘id’ => ‘left’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<div class=”widget_title_holder”><h3 class=”widget-title”>’,
‘after_title’ => ‘</h3></div>’,
));

// right sidebar
register_sidebar(array(
‘name’ => esc_html__(‘Right Sidebar’,’creatus’),
‘id’ => ‘right’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<div class=”widget_title_holder”><h3 class=”widget-title”>’,
‘after_title’ => ‘</h3></div>’,
));

// lateral header sidebar
register_sidebar(array(
‘name’ => esc_html__(‘Lateral header sidebar’,’creatus’),
‘id’ => ‘lateral-header-sidebar’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<div class=”widget_title_holder”><h3 class=”widget-title”>’,
‘after_title’ => ‘</h3></div>’,
));

When I activate the theme for the first time on a clean WP install 6 widgets get automatically added to lateral-header-sidebar

http://prntscr.com/l9cx84

Am I registering them the wrong way or why are they added to this particular sidebar and not any other?

Any help is appreciated.

Read more here:: How to avoid widgets added to sidebar on theme activation?

Leave a Reply

Your email address will not be published. Required fields are marked *