[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyfourteen/ -> 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_Fourteen
   9   * @since Twenty Fourteen 1.0
  10   */
  11  
  12  get_header(); ?>
  13  
  14      <section id="primary" class="content-area">
  15          <div id="content" class="site-content" role="main">
  16  
  17              <?php if ( have_posts() ) : ?>
  18  
  19              <header class="archive-header">
  20                  <h1 class="archive-title">
  21                  <?php
  22                  /* translators: %s: Category title. */
  23                  printf( __( 'Category Archives: %s', 'twentyfourteen' ), single_cat_title( '', false ) );
  24                  ?>
  25                  </h1>
  26  
  27                  <?php
  28                      // Show an optional term description.
  29                      $term_description = term_description();
  30                  if ( ! empty( $term_description ) ) :
  31                      printf( '<div class="taxonomy-description">%s</div>', $term_description );
  32                      endif;
  33                  ?>
  34              </header><!-- .archive-header -->
  35  
  36                  <?php
  37                  // Start the Loop.
  38                  while ( have_posts() ) :
  39                      the_post();
  40  
  41                      /*
  42                      * Include the post format-specific template for the content. If you want
  43                      * to use this in a child theme, then include a file called content-___.php
  44                      * (where ___ is the post format) and that will be used instead.
  45                      */
  46                      get_template_part( 'content', get_post_format() );
  47  
  48                      endwhile;
  49                      // Previous/next page navigation.
  50                      twentyfourteen_paging_nav();
  51  
  52                  else :
  53                      // If no content, include the "No posts found" template.
  54                      get_template_part( 'content', 'none' );
  55  
  56                  endif;
  57                  ?>
  58          </div><!-- #content -->
  59      </section><!-- #primary -->
  60  
  61  <?php
  62  get_sidebar( 'content' );
  63  get_sidebar();
  64  get_footer();


Generated: Thu Apr 25 01:00:03 2024 Cross-referenced by PHPXref 0.7.1