wp get widgets code

Solutions on MaxInterview for wp get widgets code by the best coders in the world

showing results for - "wp get widgets code"
Johanna
22 Feb 2016
1add_action( 'after_setup_theme', 'register_multiple_widget_areas' );
2
3function register_multiple_widget_areas()
4{
5    register_sidebar(
6        array(
7        'name'          => 'Sidebar',
8        'id'            => 'sidebar',
9        'description'   => 'describe the function of the box.'
10        )
11    );
12    register_sidebar(
13        array(
14        'name'          => 'Header',
15        'id'            => 'header-widget',
16        'description'   => 'Goes at the top of the page.'
17        )
18    );
19}
20