[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  <?php
   2  /**
   3   * The template for displaying Category pages
   4   *
   5   * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Thirteen
   9   * @since Twenty Thirteen 1.0
  10   */
  11  
  12  get_header(); ?>
  13  
  14      <div id="primary" class="content-area">
  15          <div id="content" class="site-content" role="main">
  16  
  17          <?php if ( have_posts() ) : ?>
  18              <header class="archive-header">
  19                  <h1 class="archive-title">
  20                  <?php
  21                  /* translators: %s: Category title. */
  22                  printf( __( 'Category Archives: %s', 'twentythirteen' ), single_cat_title( '', false ) );
  23                  ?>
  24                  </h1>
  25  
  26                  <?php if ( category_description() ) : // Show an optional category description ?>
  27                  <div class="archive-meta"><?php echo category_description(); ?></div>
  28                  <?php endif; ?>
  29              </header><!-- .archive-header -->
  30  
  31              <?php /* The loop */ ?>
  32              <?php
  33              while ( have_posts() ) :
  34                  the_post();
  35                  ?>
  36                  <?php get_template_part( 'content', get_post_format() ); ?>
  37              <?php endwhile; ?>
  38  
  39              <?php twentythirteen_paging_nav(); ?>
  40  
  41          <?php else : ?>
  42              <?php get_template_part( 'content', 'none' ); ?>
  43          <?php endif; ?>
  44  
  45          </div><!-- #content -->
  46      </div><!-- #primary -->
  47  
  48  <?php get_sidebar(); ?>
  49  <?php get_footer(); ?>


Generated: Tue Oct 22 01:00:04 2019 Cross-referenced by PHPXref 0.7.1