sidebar.php 686 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * This "sidebar" for widgets actually appears just above the site footer.
  4. *
  5. * @package Libretto
  6. */
  7. $active_sidebars = libretto_get_active_sidebars();
  8. // No sidebars? No content!
  9. if ( ! is_countable( $active_sidebars ) || 0 === count( $active_sidebars ) ) {
  10. return;
  11. }
  12. ?>
  13. <section id="footer-sidebar" class="clear widget-area" role="complementary">
  14. <?php // Otherwise, let's loop through every activated sidebar, and put it in a div
  15. foreach ( $active_sidebars as $sidebar_name ) :
  16. echo '<div id="'. esc_attr( $sidebar_name ) .'" class="widget-block">';
  17. dynamic_sidebar( esc_attr( $sidebar_name ) );
  18. echo '</div>';
  19. endforeach;
  20. ?>
  21. </section><!-- #secondary -->