<?php

/**
 * Register widget area.
 *
 * @package relax_spa
 */


function relax_spa_widgets_init() {
    
    register_sidebar( array(
		'name'          => esc_html__( 'Relax Spa Sidebar', 'relax-spa' ),
		'id'            => 'sidebar-1',
		'description'   => 'This is the sidebar to be displayed on Relax Spa pages and posts.',
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h4 class="widget-title">',
		'after_title'   => '</h4>',
	) );

    for($i = 1; $i<5; $i++){
		register_sidebar(
			array(
				'name'          => esc_html__( 'Footer Widget', 'relax-spa' ) . " " . $i,
				'id'            => 'footer-'.$i.'',
				'description'   => esc_html__( 'Add widgets here.', 'relax-spa' ),
				'before_widget' => '<section id="%1$s" class="widget %2$s">',
				'after_widget'  => '</section>',
				'before_title'  => '<h4 class="widget-title">',
				'after_title'   => '</h4>',
			)
		);
	}

}
add_action( 'widgets_init', 'relax_spa_widgets_init' );