sidebar.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * The Sidebar containing the main widget areas.
  4. *
  5. * @package Spun
  6. */
  7. ?>
  8. <?php if ( is_active_sidebar( 'sidebar-1' )
  9. || is_active_sidebar( 'sidebar-2' )
  10. || is_active_sidebar( 'sidebar-3' ) ) : ?>
  11. <a class="sidebar-link">
  12. <?php echo _x( '+', 'Open sidebar', 'spun' ); ?>
  13. </a>
  14. <?php endif; ?>
  15. <div id="secondary" class="widget-area" role="complementary">
  16. <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
  17. <?php do_action( 'before_sidebar' ); ?>
  18. <div class="widget-column <?php spun_count_sidebars(); ?>">
  19. <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
  20. <?php endif; // end sidebar widget area ?>
  21. </div>
  22. <?php endif; ?>
  23. <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
  24. <?php do_action( 'before_sidebar' ); ?>
  25. <div class="widget-column <?php spun_count_sidebars(); ?>">
  26. <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
  27. <?php endif; // end sidebar widget area ?>
  28. </div>
  29. <?php endif; ?>
  30. <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
  31. <?php do_action( 'before_sidebar' ); ?>
  32. <div class="widget-column <?php spun_count_sidebars(); ?>">
  33. <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
  34. <?php endif; // end sidebar widget area ?>
  35. </div>
  36. <?php endif; ?>
  37. </div><!-- #secondary .widget-area -->