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,27 +8,25 @@
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$container = get_theme_mod( 'understrap_container_type' );
if ( ! is_active_sidebar( 'footerfull' ) ) {
return;
}
$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">
<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
<div class="row">
<div class="row">
<?php dynamic_sidebar( 'footerfull' ); ?>
</div>
<?php dynamic_sidebar( 'footerfull' ); ?>
</div>
</div><!-- #wrapper-footer-full -->
</div>
<?php
endif;
</div><!-- #wrapper-footer-full -->

View File

@ -7,37 +7,36 @@
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! is_active_sidebar( 'hero' ) ) {
return;
}
?>
<?php if ( is_active_sidebar( 'hero' ) ) : ?>
<!-- ******************* The Hero Widget Area ******************* -->
<!-- ******************* The Hero Widget Area ******************* -->
<div id="carouselExampleControls" class="carousel slide" data-interval="false" data-bs-ride="false">
<div id="carouselExampleControls" class="carousel slide" data-interval="false" data-bs-ride="false">
<div class="carousel-inner">
<div class="carousel-inner">
<?php dynamic_sidebar( 'hero' ); ?>
<?php dynamic_sidebar( 'hero' ); ?>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev" data-bs-slide="prev">
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="screen-reader-text"><?php echo esc_html_x( 'Previous', 'carousel control', 'understrap' ); ?></span>
<span class="screen-reader-text"><?php echo esc_html_x( 'Previous', 'carousel control', 'understrap' ); ?></span>
</a>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next" data-bs-slide="next">
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="screen-reader-text"><?php echo esc_html_x( 'Next', 'carousel control', 'understrap' ); ?></span>
<span class="screen-reader-text"><?php echo esc_html_x( 'Next', 'carousel control', 'understrap' ); ?></span>
</a>
</a>
</div><!-- .carousel -->
<?php
endif;
</div><!-- .carousel -->

View File

@ -8,26 +8,25 @@
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! is_active_sidebar( 'statichero' ) ) {
return;
}
$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">
<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
<div class="row">
<div class="row">
<?php dynamic_sidebar( 'statichero' ); ?>
</div>
<?php dynamic_sidebar( 'statichero' ); ?>
</div>
</div><!-- #wrapper-static-hero -->
</div>
<?php
endif;
</div><!-- #wrapper-static-hero -->