Advertisement
Guest User

sidebar-footer.php - Add 3 new widget areas to the footer

a guest
Dec 28th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.87 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The Footer widget areas.
  4.  *
  5.  * @package WordPress
  6.  * @subpackage Twenty_Eleven
  7.  * @since Twenty Eleven 1.0
  8.  */
  9. ?>
  10.  
  11. <?php
  12.     /* The footer widget area is triggered if any of the areas
  13.      * have widgets. So let's check that first.
  14.      *
  15.      * If none of the sidebars have widgets, then let's bail early.
  16.      */
  17.     if (   ! is_active_sidebar( 'sidebar-3'  )
  18.         && ! is_active_sidebar( 'sidebar-4' )
  19.         && ! is_active_sidebar( 'sidebar-5'  )
  20.     )
  21.         return;
  22.     // If we get this far, we have widgets. Let do this.
  23. ?>
  24. <div id="supplementary" <?php sonya_footer_sidebar_class(); ?>>
  25.     <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
  26.     <div id="first" class="widget-area" role="complementary">
  27.         <?php dynamic_sidebar( 'sidebar-3' ); ?>
  28.     </div><!-- #first .widget-area -->
  29.     <?php endif; ?>
  30.  
  31.     <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
  32.     <div id="second" class="widget-area" role="complementary">
  33.         <?php dynamic_sidebar( 'sidebar-4' ); ?>
  34.     </div><!-- #second .widget-area -->
  35.     <?php endif; ?>
  36.  
  37.     <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
  38.     <div id="third" class="widget-area" role="complementary">
  39.         <?php dynamic_sidebar( 'sidebar-5' ); ?>
  40.     </div><!-- #third .widget-area -->
  41.     <?php endif; ?>
  42.    
  43.     <?php if ( is_active_sidebar( 'sidebar-6' ) ) : ?>
  44.     <div id="fourth" class="widget-area" role="complementary">
  45.         <?php dynamic_sidebar( 'sidebar-6' ); ?>
  46.     </div><!-- #fourth .widget-area -->
  47.    
  48.     <?php if ( is_active_sidebar( 'sidebar-7' ) ) : ?>
  49.     <div id="fifth" class="widget-area" role="complementary">
  50.         <?php dynamic_sidebar( 'sidebar-7' ); ?>
  51.     </div><!-- #fifth .widget-area -->
  52.    
  53.     <?php if ( is_active_sidebar( 'sidebar-8' ) ) : ?>
  54.     <div id="sixth" class="widget-area" role="complementary">
  55.         <?php dynamic_sidebar( 'sidebar-8' ); ?>
  56.     </div><!-- #sixth .widget-area -->
  57.     <?php endif; ?>
  58.     <?php endif; ?>
  59.     <?php endif; ?>
  60. </div><!-- #supplementary -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement