[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-content/themes/twentynineteen/ -> 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_Nineteen
   9   * @since 1.0.0
  10   */
  11  
  12  get_header();
  13  ?>
  14  
  15      <div id="primary" class="content-area">
  16          <main id="main" class="site-main">
  17  
  18          <?php if ( have_posts() ) : ?>
  19  
  20              <header class="page-header">
  21                  <?php
  22                      the_archive_title( '<h1 class="page-title">', '</h1>' );
  23                  ?>
  24              </header><!-- .page-header -->
  25  
  26              <?php
  27              // Start the Loop.
  28              while ( have_posts() ) :
  29                  the_post();
  30  
  31                  /*
  32                   * Include the Post-Format-specific template for the content.
  33                   * If you want to override this in a child theme, then include a file
  34                   * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  35                   */
  36                  get_template_part( 'template-parts/content/content', 'excerpt' );
  37  
  38                  // End the loop.
  39              endwhile;
  40  
  41              // Previous/next page navigation.
  42              twentynineteen_the_posts_navigation();
  43  
  44              // If no content, include the "No posts found" template.
  45          else :
  46              get_template_part( 'template-parts/content/content', 'none' );
  47  
  48          endif;
  49          ?>
  50          </main><!-- #main -->
  51      </div><!-- #primary -->
  52  
  53  <?php
  54  get_footer();


Generated: Fri Oct 25 08:20:01 2019 Cross-referenced by PHPXref 0.7