<?php
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*
* @package FreshWP WordPress Theme
* @copyright Copyright (C) 2025 ThemesDNA
* @license licennse URI, for example : http://www.gnu.org/licenses/gpl-2.0.html
* @author ThemesDNA <themesdna@gmail.com>
*/

function freshwp_widgets_init() {

register_sidebar(array(
    'id' => 'freshwp-header-banner',
    'name' => esc_html__( 'Header Banner', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the header of the web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-header-widget widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title">',
    'after_title' => '</h2>'));

register_sidebar(array(
    'id' => 'freshwp-left-sidebar',
    'name' => esc_html__( 'Sidebar 1', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the left-hand side of web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-side-widget widget freshwp-box %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-right-sidebar',
    'name' => esc_html__( 'Sidebar 2', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the right-hand side of web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-side-widget widget freshwp-box %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-home-top-widgets',
    'name' => esc_html__( 'Top Widgets (Home Page Only)', 'freshwp' ),
    'description' => esc_html__( 'This widget area is located at the top of homepage.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-main-widget widget freshwp-box %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-top-widgets',
    'name' => esc_html__( 'Top Widgets (Every Page)', 'freshwp' ),
    'description' => esc_html__( 'This widget area is located at the top of every page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-main-widget widget freshwp-box %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-home-bottom-widgets',
    'name' => esc_html__( 'Bottom Widgets (Home Page Only)', 'freshwp' ),
    'description' => esc_html__( 'This widget area is located at the bottom of homepage.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-main-widget widget freshwp-box %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-bottom-widgets',
    'name' => esc_html__( 'Bottom Widgets (Every Page)', 'freshwp' ),
    'description' => esc_html__( 'This widget area is located at the bottom of every page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-main-widget widget freshwp-box %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-footer-1',
    'name' => esc_html__( 'Footer 1', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the left bottom of web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-footer-widget widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-footer-2',
    'name' => esc_html__( 'Footer 2', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the middle bottom of web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-footer-widget widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-footer-3',
    'name' => esc_html__( 'Footer 3', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the middle bottom of web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-footer-widget widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

register_sidebar(array(
    'id' => 'freshwp-footer-4',
    'name' => esc_html__( 'Footer 4', 'freshwp' ),
    'description' => esc_html__( 'This sidebar is located on the right bottom of web page.', 'freshwp' ),
    'before_widget' => '<div id="%1$s" class="freshwp-footer-widget widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="freshwp-widget-title"><span>',
    'after_title' => '</span></h2>'));

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