wp get widgets code
add_action( 'after_setup_theme', 'register_multiple_widget_areas' );
function register_multiple_widget_areas()
{
register_sidebar(
array(
'name' => 'Sidebar',
'id' => 'sidebar',
'description' => 'describe the function of the box.'
)
);
register_sidebar(
array(
'name' => 'Header',
'id' => 'header-widget',
'description' => 'Goes at the top of the page.'
)
);
}