Advertisement
alchymyth

sidebar-footer.php 6 widgets

Jan 1st, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.72 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The Footer widget areas - edited for six widget areas, two rows.
  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.         && ! is_active_sidebar( 'sidebar-6'  ) //the fourth new one//
  21.         && ! is_active_sidebar( 'sidebar-7'  ) //the fifth new one//
  22.         && ! is_active_sidebar( 'sidebar-8'  ) //the sixth new one//
  23.     )
  24.         return;
  25.     // If we get this far, we have widgets. Let do this.
  26. ?>
  27. <?php $clear = 0; ?>
  28. <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>>
  29.     <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
  30.      <?php $clear++; ?>
  31.     <div id="first" class="widget-area" role="complementary">
  32.         <?php dynamic_sidebar( 'sidebar-3' ); ?>
  33.     </div><!-- #first .widget-area -->
  34.     <?php endif; ?>
  35.  
  36.     <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
  37.      <?php $clear++; ?>
  38.     <div id="second" class="widget-area" role="complementary">
  39.         <?php dynamic_sidebar( 'sidebar-4' ); ?>
  40.     </div><!-- #second .widget-area -->
  41.     <?php endif; ?>
  42.  
  43.     <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
  44.      <?php if( ($clear++)%3 == 0 ) echo '<div class="clear"></div>'; ?>
  45.     <div id="third" class="widget-area<?php if( $clear%3 == 0 ) echo ' footer-widget-last'; ?>" role="complementary">
  46.         <?php dynamic_sidebar( 'sidebar-5' ); ?>
  47.     </div><!-- #third .widget-area -->
  48.     <?php endif; ?>
  49.  
  50.     <?php if ( is_active_sidebar( 'sidebar-6' ) ) : //the fourth new one// ?>
  51.      <?php if( ($clear++)%3 == 0 ) echo '<div class="clear"></div>'; ?>
  52.     <div id="fourth" class="widget-area<?php if( $clear%3 == 0 ) echo ' footer-widget-last'; ?>" role="complementary">
  53.         <?php dynamic_sidebar( 'sidebar-6' ); ?>
  54.     </div><!-- #fourth .widget-area -->
  55.     <?php endif; ?>
  56.  
  57.     <?php if ( is_active_sidebar( 'sidebar-7' ) ) : //the fifth new one// ?>
  58.      <?php if( ($clear++)%3 == 0 ) echo '<div class="clear"></div>'; ?>
  59.     <div id="fifth" class="widget-area<?php if( $clear%3 == 0 ) echo ' footer-widget-last'; ?>" role="complementary">
  60.         <?php dynamic_sidebar( 'sidebar-7' ); ?>
  61.     </div><!-- #fifth .widget-area -->
  62.     <?php endif; ?>
  63.  
  64.     <?php if ( is_active_sidebar( 'sidebar-8' ) ) : //the sixth new one// ?>
  65.      <?php if( ($clear++)%3 == 0 ) echo '<div class="clear"></div>'; ?>
  66.     <div id="sixth" class="widget-area<?php if( $clear%3 == 0 ) echo ' footer-widget-last'; ?>" role="complementary">
  67.         <?php dynamic_sidebar( 'sidebar-8' ); ?>
  68.     </div><!-- #sixth .widget-area -->
  69.     <?php endif; ?>
  70.  
  71. </div><!-- #supplementary -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement