[ Index ]

WordPress Cross Reference

title

Body

[close]

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


Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu