-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
48 lines (42 loc) · 1.7 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* The template for displaying A pages.
*/
get_header(); ?>
<section id="container">
<div id="content" role="main">
<?php the_post(); ?>
<header class="page-header">
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: %s', 'coffee' ), '<span>' . get_the_date() . '</span>' ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: %s', 'coffee' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'coffee' ) ) . '</span>' ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: %s', 'coffee' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'coffee' ) ) . '</span>' ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'coffee' ); ?>
<?php endif; ?>
</h1>
</header>
<?php rewind_posts(); ?>
<?php /* Start the Loop */ ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() );?>
<?php endwhile; ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous">
<?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'coffee' ) ); ?>
</div>
<div class="nav-next">
<?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'coffee' ) ); ?>
</div>
</nav>
<!-- end nav-below -->
<?php endif; ?>
</div><!-- #content -->
</section><!--#container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>