hangar-wp-theme/hangar/library/widgetized-sidebars.php

32 lines
1.3 KiB
PHP
Raw Normal View History

2021-02-18 14:09:56 +01:00
<?php
/* Register widgetized areas, including two sidebars and four widget-ready columns in the footer. */
function ari_widgets_init() {
// Primary Widget area (left, fixed sidebar)
register_sidebar( array(
'name' => __( 'Primary Widget Area', 'hangar' ),
'id' => 'primary-widget-area',
'description' => __( 'Here you can put one or two of your main widgets (like an intro text, your page navigation or some social site links) in your left sidebar. The sidebar is fixed, so the widgets content will always be visible, even when scrolling down the page.', 'ari' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
// Secondary Widget area (right, additional sidebar)
register_sidebar( array(
'name' => __( 'Secondary Widget Area', 'hangar' ),
'id' => 'secondary-widget-area',
'description' => __( 'Here you can put all the additional widgets for your right sidebar.', 'hangar' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
/* Register sidebars by running ari_widgets_init() on the widgets_init hook. */
add_action( 'widgets_init', 'ari_widgets_init' );
?>