Merge pull request #711 from alex-wright-net/master-sidebar-organize
Organize sidebar files into loop-templates directory
This commit is contained in:
commit
18d1841b5b
|
@ -11,7 +11,7 @@ $the_theme = wp_get_theme();
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php get_sidebar( 'footerfull' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'footerfull' ); ?>
|
||||||
|
|
||||||
<div class="wrapper" id="wrapper-footer">
|
<div class="wrapper" id="wrapper-footer">
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
|
|
||||||
<div class="wrapper" id="wrapper-hero">
|
<div class="wrapper" id="wrapper-hero">
|
||||||
|
|
||||||
<?php get_sidebar( 'hero' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'hero' ); ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'herocanvas' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'herocanvas' ); ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'statichero' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'statichero' ); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
<?php get_sidebar( 'left' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'left' ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
|
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -17,7 +17,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<?php get_sidebar( 'left' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'left' ); ?>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="<?php
|
class="<?php
|
||||||
|
@ -46,7 +46,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<?php get_sidebar( 'left' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'left' ); ?>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="<?php if ( is_active_sidebar( 'left-sidebar' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area"
|
class="<?php if ( is_active_sidebar( 'left-sidebar' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area"
|
||||||
|
|
|
@ -40,7 +40,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,4 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php dynamic_sidebar( 'left-sidebar' ); ?>
|
<?php dynamic_sidebar( 'left-sidebar' ); ?>
|
||||||
|
|
||||||
</div><!-- #secondary -->
|
</div><!-- #left-sidebar -->
|
|
@ -20,4 +20,4 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php dynamic_sidebar( 'right-sidebar' ); ?>
|
<?php dynamic_sidebar( 'right-sidebar' ); ?>
|
||||||
|
|
||||||
</div><!-- #secondary -->
|
</div><!-- #right-sidebar -->
|
17
sidebar.php
17
sidebar.php
|
@ -1,17 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* The sidebar containing the main widget area.
|
|
||||||
*
|
|
||||||
* @package understrap
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="col-md-4 widget-area" id="secondary" role="complementary">
|
|
||||||
|
|
||||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
|
||||||
|
|
||||||
</div><!-- #secondary -->
|
|
Reference in New Issue