[ Index ]

PHP Cross Reference of WordPress

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 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" role="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 will be used instead.
  41                   */
  42                  get_template_part( 'template-parts/post/content', get_post_format() );
  43  
  44              endwhile;
  45  
  46              the_posts_pagination(
  47                  array(
  48                      'prev_text'          => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
  49                      'next_text'          => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
  50                      'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
  51                  )
  52              );
  53  
  54          else :
  55  
  56              get_template_part( 'template-parts/post/content', 'none' );
  57  
  58          endif;
  59          ?>
  60  
  61          </main><!-- #main -->
  62      </div><!-- #primary -->
  63      <?php get_sidebar(); ?>
  64  </div><!-- .wrap -->
  65  
  66  <?php
  67  get_footer();


Generated: Wed Jul 17 01:00:03 2019 Cross-referenced by PHPXref 0.7.1