<?php
   /**
   * Register widget area.
   *
   * @link https://developer.wordpress.org/themes/functionality/sidebars/#registerin  g-a-sidebar
   */
  function xarxaprod_widgets_init() {
    register_sidebar(
      array(
        'name'          => esc_html__( 'Front Page - Despres del contingut a la Pagina principal', 'xarxaprod' ),
        'id'            => 'front-page-widgets',
        'description'   => esc_html__( 'Add widgets here.', 'xarxaprod' ),
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
      )
    );
    register_sidebar(
      array(
        'name'          => esc_html__( 'After content - Despres del contingut i abans del peu. A tota la web.', 'xarxaprod' ),
        'id'            => 'after-content',
        'description'   => esc_html__( 'Add widgets here.', 'xarxaprod' ),
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
      )
    );
    register_sidebar(
      array(
        'name'          => esc_html__( 'After Associats - Despres del contingut als Espais Associats i abans del peu', 'xarxaprod' ),
        'id'            => 'after-content-members',
        'description'   => esc_html__( 'Add widgets here.', 'xarxaprod' ),
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
      )
    );
    register_sidebar(
      array(
        'name'          => esc_html__( 'Footer - Peu de página', 'xarxaprod' ),
        'id'            => 'footer-widgets',
        'description'   => esc_html__( 'Add widgets here.', 'xarxaprod' ),
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
      )
    );
  }
  add_action( 'widgets_init', 'xarxaprod_widgets_init' );

