wordpress/php-fpm/wordpress_files/themes/hero/sidebar-footer.php
2020-05-22 01:40:23 +00:00

31 lines
672 B
PHP

<?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 -->