[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyeleven/ -> category.php (source)

   1  <?php
   2  /**
   3   * Template for displaying Category Archive pages
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Eleven
   7   * @since Twenty Eleven 1.0
   8   */
   9  
  10  get_header(); ?>
  11  
  12          <section id="primary">
  13              <div id="content" role="main">
  14  
  15              <?php if ( have_posts() ) : ?>
  16  
  17                  <header class="page-header">
  18                      <h1 class="page-title">
  19                      <?php
  20                          /* translators: %s: Ñategory title. */
  21                          printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  22                      ?>
  23                      </h1>
  24  
  25                      <?php
  26                          $category_description = category_description();
  27                      if ( ! empty( $category_description ) ) {
  28                          /**
  29                           * Filters the default Twenty Eleven category description.
  30                           *
  31                           * @since Twenty Eleven 1.0
  32                           *
  33                           * @param string The default category description HTML.
  34                           */
  35                          echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
  36                      }
  37                      ?>
  38                  </header>
  39  
  40                  <?php twentyeleven_content_nav( 'nav-above' ); ?>
  41  
  42                  <?php
  43                  // Start the Loop.
  44                  while ( have_posts() ) :
  45                      the_post();
  46                      ?>
  47  
  48                      <?php
  49                          /*
  50                           * Include the Post-Format-specific template for the content.
  51                           * If you want to overload this in a child theme then include a file
  52                           * called content-___.php (where ___ is the Post Format name) and that
  53                           * will be used instead.
  54                           */
  55                          get_template_part( 'content', get_post_format() );
  56                      ?>
  57  
  58                  <?php endwhile; ?>
  59  
  60                  <?php twentyeleven_content_nav( 'nav-below' ); ?>
  61  
  62              <?php else : ?>
  63  
  64                  <article id="post-0" class="post no-results not-found">
  65                      <header class="entry-header">
  66                          <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  67                      </header><!-- .entry-header -->
  68  
  69                      <div class="entry-content">
  70                          <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  71                          <?php get_search_form(); ?>
  72                      </div><!-- .entry-content -->
  73                  </article><!-- #post-0 -->
  74  
  75              <?php endif; ?>
  76  
  77              </div><!-- #content -->
  78          </section><!-- #primary -->
  79  
  80  <?php get_sidebar(); ?>
  81  <?php get_footer(); ?>


Generated: Mon Oct 7 01:00:03 2024 Cross-referenced by PHPXref 0.7.1