WordPress Registering sidebars


Example

In your functions.php you can register new sidebars with this code

/**
 * Registers sidebars
 *
 * @param array Array with default or specified array values
 * @since       1.0.0
 */
if ( function_exists( 'register_sidebar' ) ) {
    register_sidebar( array (
        'name'          => esc_html__( 'Primary Sidebar', 'mytheme'),
        'id'            => 'primary-widget-area',
        'description'   => esc_html__( 'The Primary Widget Area', 'mytheme'),
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
        'after_widget'  => '</div>',
        'before_title'  => '<div class="sidebar-widget-heading"><h3>',
        'after_title'   => '</h3></div>',
    ) );

    register_sidebar( array (
        'name'          => esc_html__( 'Secondary Sidebar', 'mytheme'),
        'id'            => 'secondary-widget-area',
        'description'   => esc_html__( 'The Secondary Widget Area', 'mytheme'),
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
        'after_widget'  => '</div>',
        'before_title'  => '<div class="sidebar-widget-heading"><h3>',
        'after_title'   => '</h3></div>',
    ) );
}

You can add as many sidebars as you want to.