-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
34 lines (30 loc) · 884 Bytes
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* The Template for displaying Archive pages.
*/
get_header();
if ( have_posts() ) :
?>
<header class="page-header">
<h1 class="page-title">
<?php
if ( is_day() ) :
printf( esc_html__( 'Daily Archives: %s', 'polyglotwannabe' ), get_the_date() );
elseif ( is_month() ) :
printf( esc_html__( 'Monthly Archives: %s', 'polyglotwannabe' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'polyglotwannabe' ) ) );
elseif ( is_year() ) :
printf( esc_html__( 'Yearly Archives: %s', 'polyglotwannabe' ), get_the_date( _x( 'Y', 'yearly archives date format', 'polyglotwannabe' ) ) );
else :
esc_html_e( 'Blog Archives', 'polyglotwannabe' );
endif;
?>
</h1>
</header>
<?php
get_template_part( 'archive', 'loop' );
else :
// 404.
get_template_part( 'content', 'none' );
endif;
wp_reset_postdata(); // End of the loop.
get_footer();