WordPress 4.7
[autoinstalls/wordpress.git] / wp-content / themes / twentyseventeen / archive.php
1 <?php
2 /**
3  * The template for displaying archive pages
4  *
5  * @link https://codex.wordpress.org/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                         <?php
32                         /* Start the Loop */
33                         while ( have_posts() ) : the_post();
34
35                                 /*
36                                  * Include the Post-Format-specific template for the content.
37                                  * If you want to override this in a child theme, then include a file
38                                  * called content-___.php (where ___ is the Post Format name) and that will be used instead.
39                                  */
40                                 get_template_part( 'template-parts/post/content', get_post_format() );
41
42                         endwhile;
43
44                         the_posts_pagination( array(
45                                 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
46                                 'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
47                                 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
48                         ) );
49
50                 else :
51
52                         get_template_part( 'template-parts/post/content', 'none' );
53
54                 endif; ?>
55
56                 </main><!-- #main -->
57         </div><!-- #primary -->
58         <?php get_sidebar(); ?>
59 </div><!-- .wrap -->
60
61 <?php get_footer();