[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwelve/ -> sidebar-front.php (source)

   1  <?php
   2  /**
   3   * The sidebar containing the front page widget areas
   4   *
   5   * If no active widgets are in either sidebar, hide them completely.
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Twelve
   9   * @since Twenty Twelve 1.0
  10   */
  11  
  12  /*
  13   * The front page widget area is triggered if any of the areas
  14   * have widgets. So let's check that first.
  15   *
  16   * If none of the sidebars have widgets, then let's bail early.
  17   */
  18  if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) ) {
  19      return;
  20  }
  21  
  22  // If we get this far, we have widgets. Let do this.
  23  ?>
  24  <div id="secondary" class="widget-area" role="complementary">
  25      <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
  26      <div class="first front-widgets">
  27          <?php dynamic_sidebar( 'sidebar-2' ); ?>
  28      </div><!-- .first -->
  29      <?php endif; ?>
  30  
  31      <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
  32      <div class="second front-widgets">
  33          <?php dynamic_sidebar( 'sidebar-3' ); ?>
  34      </div><!-- .second -->
  35      <?php endif; ?>
  36  </div><!-- #secondary -->


Generated: Thu Nov 14 01:00:07 2024 Cross-referenced by PHPXref 0.7.1