themes-wordpress/libretto/sidebar.php

25 lines
686 B
PHP
Raw Permalink Normal View History

2018-02-27 03:27:44 +00:00
<?php
/**
* This "sidebar" for widgets actually appears just above the site footer.
*
* @package Libretto
*/
$active_sidebars = libretto_get_active_sidebars();
// No sidebars? No content!
if ( ! is_countable( $active_sidebars ) || 0 === count( $active_sidebars ) ) {
2018-02-27 03:27:44 +00:00
return;
}
?>
<section id="footer-sidebar" class="clear widget-area" role="complementary">
<?php // Otherwise, let's loop through every activated sidebar, and put it in a div
foreach ( $active_sidebars as $sidebar_name ) :
echo '<div id="'. esc_attr( $sidebar_name ) .'" class="widget-block">';
dynamic_sidebar( esc_attr( $sidebar_name ) );
echo '</div>';
endforeach;
?>
</section><!-- #secondary -->