first you should register sidebars in your functions file. This way they show up as available spaces in your widgets section.
helpful links:
https://codex.ww.wp.xz.cn/Function_Reference/register_sidebars
https://developer.ww.wp.xz.cn/themes/functionality/sidebars/
example of that for 4 sidebar areas used in a footer template:
function custom_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Widget Area 1', 'yourthemename' ),
'id' => 'footer-1',
'description' => __( 'Appears in the footer section of the site.', 'yourthemename' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => __( 'Footer Widget Area 2', 'yourthemename' ),
'id' => 'footer-2',
'description' => __( 'Appears in the footer section of the site.', 'yourthemename' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => __( 'Footer Widget Area 3', 'yourthemename' ),
'id' => 'footer-3',
'description' => __( 'Appears in the footer section of the site.', 'yourthemename' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="widget-title">',
'after_title' => '</h5>',
) );
register_sidebar( array(
'name' => __( 'Footer Widget Area 4', 'yourthemename' ),
'id' => 'footer-4',
'description' => __( 'Appears in the footer section of the site.', 'yourthemename' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h5 class="widget-title">',
'after_title' => '</h5>',
) );
}
add_action( 'widgets_init', 'custom_widgets_init' );
Then you can write where those sidebars show up in your theme’s page template files. here’s a very loose example of what that code may look like:
<div class="widget-area">
<section id="footer-one" class="foot">
<?php dynamic_sidebar( 'footer-1' ); ?>
</section>
<?php if (is_active_sidebar( 'footer-2' ) ) : ?>
<section id="footer-two" class="foot">
<?php dynamic_sidebar( 'footer-2' ); ?>
</section>
<?php endif; ?>
<?php if (is_active_sidebar( 'footer-3' ) ) : ?>
<section id="footer-three" class="foot">
<?php dynamic_sidebar( 'footer-3' ); ?>
</section>
<?php endif; ?>
<?php if (is_active_sidebar( 'footer-4' ) ) : ?>
<section id="footer-four" class="foot">
<?php dynamic_sidebar( 'footer-4' ); ?>
</section>
<?php endif; ?>
</div>
you will of course decide how you want that marked up, but you get the idea. Register some sidebars. add them to whatever template files you want. (and style them of course) and then slap some widgets in there.