xarxaprod-wp-theme/inc/widgets-register.php

55 lines
2.2 KiB
PHP
Raw Normal View History

2024-01-09 16:13:20 +01:00
<?php
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registerin g-a-sidebar
*/
function xarxaprod_widgets_init() {
2024-01-09 16:13:20 +01:00
register_sidebar(
array(
'name' => esc_html__( 'Front Page - Despres del contingut a la Pagina principal', 'xarxaprod' ),
2024-01-09 16:13:20 +01:00
'id' => 'front-page-widgets',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
2024-01-09 16:13:20 +01:00
'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' ),
2024-01-09 16:13:20 +01:00
'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' ),
2024-01-09 16:13:20 +01:00
'id' => 'footer-widgets',
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
2024-01-09 16:13:20 +01:00
'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' );
2024-01-09 16:13:20 +01:00