sidebar start
test case
if ( ! function_exists( 'custom_sidebar' ) ) {
// Register Sidebars
function custom_sidebar() {
$args = array(
'id' => 'sidebar-section',
'name' => __( 'Secondary Widget Area', 'text_domain' ),
'description' => __( 'Section Widgets.', 'text_domain' ),
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
);
register_sidebar( $args );
$args = array(
'id' => 'side2',
'name' => __( 'Side2', 'text_domain' ),
'description' => __( 'try to creat a second sidebar widget', 'text_domain' ),
'before_title' => '<h2 class='widgettitle'>Widget Titling',
'after_title' => '</h2>',
);
register_sidebar( $args );
}
add_action( 'widgets_init', 'custom_sidebar' );
}