63 lines
1.9 KiB
PHP
63 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* Declaring widgets
|
|
*
|
|
*
|
|
* @package understrap
|
|
*/
|
|
if ( ! function_exists( 'understrap_widgets_init' ) ) {
|
|
function understrap_widgets_init() {
|
|
register_sidebar( array(
|
|
'name' => __( 'Right Sidebar', 'understrap' ),
|
|
'id' => 'right-sidebar',
|
|
'description' => 'Right sidebar widget area',
|
|
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
|
'after_widget' => '</aside>',
|
|
'before_title' => '<h3 class="widget-title">',
|
|
'after_title' => '</h3>',
|
|
) );
|
|
|
|
register_sidebar( array(
|
|
'name' => __( 'Left Sidebar', 'understrap' ),
|
|
'id' => 'left-sidebar',
|
|
'description' => 'Left sidebar widget area',
|
|
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
|
'after_widget' => '</aside>',
|
|
'before_title' => '<h3 class="widget-title">',
|
|
'after_title' => '</h3>',
|
|
) );
|
|
|
|
register_sidebar( array(
|
|
'name' => __( 'Hero Slider', 'understrap' ),
|
|
'id' => 'hero',
|
|
'description' => 'Hero slider area. Place two or more widgets here and they will slide!',
|
|
'before_widget' => '<div class="item">',
|
|
'after_widget' => '</div>',
|
|
'before_title' => '',
|
|
'after_title' => '',
|
|
) );
|
|
|
|
register_sidebar( array(
|
|
'name' => __( 'Hero Static', 'understrap' ),
|
|
'id' => 'statichero',
|
|
'description' => 'Static Hero widget. no slider functionallity',
|
|
'before_widget' => '',
|
|
'after_widget' => '',
|
|
'before_title' => '',
|
|
'after_title' => '',
|
|
) );
|
|
|
|
register_sidebar( array(
|
|
'name' => __( 'Footer Full', 'understrap' ),
|
|
'id' => 'footerfull',
|
|
'description' => 'Widget area below main content and above footer',
|
|
'before_widget' => '',
|
|
'after_widget' => '',
|
|
'before_title' => '',
|
|
'after_title' => '',
|
|
) );
|
|
|
|
}
|
|
}
|
|
add_action( 'widgets_init', 'understrap_widgets_init' );
|