adding static hero widget

This commit is contained in:
Holger 2015-08-13 14:00:24 +02:00
parent beedd83428
commit 85b1bd2abe
3 changed files with 29 additions and 0 deletions

View File

@ -19,6 +19,16 @@ function understrap_widgets_init() {
'before_title' => '', 'before_title' => '',
'after_title' => '', 'after_title' => '',
) ); ) );
register_sidebar( array(
'name' => __( 'Static Hero', 'understrap' ),
'id' => 'statichero',
'description' => '',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
) );
/* /*
register_sidebar( array( register_sidebar( array(
'name' => __( 'Off Canvas', 'understrap' ), 'name' => __( 'Off Canvas', 'understrap' ),

View File

@ -13,8 +13,12 @@
get_header(); ?> get_header(); ?>
/* Loads widget slider area */
<?php get_template_part('hero'); ?> <?php get_template_part('hero'); ?>
/* Loads static hero */
<?php get_template_part('statichero'); ?>
<div class="wrapper" id="wrapper-index"> <div class="wrapper" id="wrapper-index">

15
statichero.php Normal file
View File

@ -0,0 +1,15 @@
<?php if ( is_active_sidebar( 'statichero' ) ): ?>
<!-- ******************* The Hero Widget Area ******************* -->
<div class="wrapper" id="wrapper-statichero">
<div class="container">
<div class="row">
<div class="col-md-12">
<?php dynamic_sidebar( 'statichero' ); ?>
</div>
</div>
</div>
</div>
<?php else : ?>
<?php endif; ?>