[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

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


Generated: Fri Apr 26 01:00:03 2024 Cross-referenced by PHPXref 0.7.1