improve sidebar template readability

This commit is contained in:
IanDelMar 2023-01-29 19:44:02 +01:00
parent c3d1f894be
commit 826f3a8f0b
3 changed files with 40 additions and 44 deletions

View File

@ -8,12 +8,13 @@
// Exit if accessed directly. // Exit if accessed directly.
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
if ( ! is_active_sidebar( 'footerfull' ) ) {
return;
}
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>
<?php if ( is_active_sidebar( 'footerfull' ) ) : ?>
<!-- ******************* The Footer Full-width Widget Area ******************* --> <!-- ******************* The Footer Full-width Widget Area ******************* -->
<div class="wrapper" id="wrapper-footer-full" role="complementary"> <div class="wrapper" id="wrapper-footer-full" role="complementary">
@ -29,6 +30,3 @@ $container = get_theme_mod( 'understrap_container_type' );
</div> </div>
</div><!-- #wrapper-footer-full --> </div><!-- #wrapper-footer-full -->
<?php
endif;

View File

@ -7,9 +7,11 @@
// Exit if accessed directly. // Exit if accessed directly.
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
?>
<?php if ( is_active_sidebar( 'hero' ) ) : ?> if ( ! is_active_sidebar( 'hero' ) ) {
return;
}
?>
<!-- ******************* The Hero Widget Area ******************* --> <!-- ******************* The Hero Widget Area ******************* -->
@ -38,6 +40,3 @@ defined( 'ABSPATH' ) || exit;
</a> </a>
</div><!-- .carousel --> </div><!-- .carousel -->
<?php
endif;

View File

@ -8,11 +8,13 @@
// Exit if accessed directly. // Exit if accessed directly.
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
if ( ! is_active_sidebar( 'statichero' ) ) {
return;
}
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>
<?php if ( is_active_sidebar( 'statichero' ) ) : ?>
<!-- ******************* The Hero Widget Area ******************* --> <!-- ******************* The Hero Widget Area ******************* -->
<div class="wrapper" id="wrapper-static-hero"> <div class="wrapper" id="wrapper-static-hero">
@ -28,6 +30,3 @@ $container = get_theme_mod( 'understrap_container_type' );
</div> </div>
</div><!-- #wrapper-static-hero --> </div><!-- #wrapper-static-hero -->
<?php
endif;