[ 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: category 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                           * Filter 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 /* Start the Loop */ ?>
  43                  <?php
  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 will be used instead.
  53                           */
  54                          get_template_part( 'content', get_post_format() );
  55                      ?>
  56  
  57                  <?php endwhile; ?>
  58  
  59                  <?php twentyeleven_content_nav( 'nav-below' ); ?>
  60  
  61              <?php else : ?>
  62  
  63                  <article id="post-0" class="post no-results not-found">
  64                      <header class="entry-header">
  65                          <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  66                      </header><!-- .entry-header -->
  67  
  68                      <div class="entry-content">
  69                          <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  70                          <?php get_search_form(); ?>
  71                      </div><!-- .entry-content -->
  72                  </article><!-- #post-0 -->
  73  
  74              <?php endif; ?>
  75  
  76              </div><!-- #content -->
  77          </section><!-- #primary -->
  78  
  79  <?php get_sidebar(); ?>
  80  <?php get_footer(); ?>


Generated: Thu Jul 18 01:00:03 2019 Cross-referenced by PHPXref 0.7.1