[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentyseventeen/ -> archive.php (source)

   1  <?php
   2  /**
   3   * The template for displaying archive pages
   4   *
   5   * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Seventeen
   9   * @since Twenty Seventeen 1.0
  10   * @version 1.0
  11   */
  12  
  13  get_header(); ?>
  14  
  15  <div class="wrap">
  16  
  17      <?php if ( have_posts() ) : ?>
  18          <header class="page-header">
  19              <?php
  20                  the_archive_title( '<h1 class="page-title">', '</h1>' );
  21                  the_archive_description( '<div class="taxonomy-description">', '</div>' );
  22              ?>
  23          </header><!-- .page-header -->
  24      <?php endif; ?>
  25  
  26      <div id="primary" class="content-area">
  27          <main id="main" class="site-main">
  28  
  29          <?php
  30          if ( have_posts() ) :
  31              ?>
  32              <?php
  33              // Start the Loop.
  34              while ( have_posts() ) :
  35                  the_post();
  36  
  37                  /*
  38                   * Include the Post-Format-specific template for the content.
  39                   * If you want to override this in a child theme, then include a file
  40                   * called content-___.php (where ___ is the Post Format name) and that
  41                   * will be used instead.
  42                   */
  43                  get_template_part( 'template-parts/post/content', get_post_format() );
  44  
  45              endwhile;
  46  
  47              the_posts_pagination(
  48                  array(
  49                      /* translators: Hidden accessibility text. */
  50                      'prev_text'          => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
  51                      /* translators: Hidden accessibility text. */
  52                      'next_text'          => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
  53                      /* translators: Hidden accessibility text. */
  54                      'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
  55                  )
  56              );
  57  
  58          else :
  59  
  60              get_template_part( 'template-parts/post/content', 'none' );
  61  
  62          endif;
  63          ?>
  64  
  65          </main><!-- #main -->
  66      </div><!-- #primary -->
  67      <?php get_sidebar(); ?>
  68  </div><!-- .wrap -->
  69  
  70  <?php
  71  get_footer();


Generated : Sun Dec 22 08:20:01 2024 Cross-referenced by PHPXref