wordpress/php-fpm/wordpress_files/themes/hero/sidebar-footer.php

31 lines
672 B
PHP
Raw Normal View History

2020-05-22 03:40:23 +02:00
<?php
/**
* Footer widgets
*
* @package hero
*/
$active = array();
for ( $i = 1; $i <= 3; $i++ ) {
if ( is_active_sidebar( 'footer-' . $i ) ) {
$active[] = $i;
}
}
if ( 0 === count( $active ) ) {
return;
}
?>
<div id="footer-widgets">
<div class="container">
<div class="row">
<?php foreach ( $active as $hero_id ) : ?>
<aside class="footer-active-<?php echo absint( count( $active ) ); ?> footer-widget-area">
<?php dynamic_sidebar( 'footer-' . $hero_id ); ?>
</aside><!-- .footer-widget-area -->
<?php endforeach; ?>
</div><!-- .inner-wrapper -->
</div><!-- .container -->
</div><!-- #footer-widgets -->