This is what I’m using
// Register widgetized areas
function theme_widgets_init() {
// Area 1
register_sidebar( array (
'name' => 'Primary Widget Area',
'id' => 'primary_widget_area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => "</li>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
// Area 2
register_sidebar( array (
'name' => 'Secondary Widget Area',
'id' => 'secondary_widget_area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => "</li>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer Area One' ),
'id' => 'sidebar-3',
'description' => __( 'An optional widget area for your site footer' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer Area Two' ),
'id' => 'sidebar-4',
'description' => __( 'An optional widget area for your site footer' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer Area Three' ),
'id' => 'sidebar-5',
'description' => __( 'An optional widget area for your site footer' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
} // end theme_widgets_init
add_action( 'init', 'theme_widgets_init' );
// precode the search, pages, categories, archives, links and meta widgets into the sidebars
$preset_widgets = array (
'primary_widget_area' => array( 'search', 'pages', 'categories', 'archives' ),
'secondary_widget_area' => array( 'links', 'meta' )
);
if ( isset( $_GET['activated'] ) ) {
update_option( 'sidebars_widgets', $preset_widgets );
}