function themename_widgets_init () {
register_sidebar( array(
‘name’ => __( ‘Custom sidebar’, ‘bootstrap-start-child’ ), // name of sidebar and theme for translation
‘id’ => ‘custom-sidebar’, // sidebar’o id, naudojamas parodyti sidebar
‘before_widget’ => ”, // html tag prieš sidebar
‘after_widget’ => ”, // html tag po sidebar
‘before_title’ => ”, // title prieš pavadinimą sidebar
‘after_title’ => ”, // closing html tag po pavadinimo sidebar
) );
}
add_action(‘init’, ‘themename_widgets_init’);
Tam, kad rodytų sidebar
dynamic_sidebar( 'custom-sidebar' );