forked from mocy/CalPress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
43 lines (42 loc) · 1.34 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
<?php
/**
* The template for displaying Archive pages.
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* Copyright (c) 2012 The Regents of the University of California
* Released under the GPL Version 2 license
* http://www.opensource.org/licenses/gpl-2.0.php
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @package WordPress
* @subpackage CalPress2
* @since CalPress 0.9.7
*/
get_header(); ?>
<section id="content" class="clearfix">
<?php if ( have_posts() ) the_post(); ?>
<header>
<h1 class="page-title"><?php
if ( is_day() ) :
printf( __( 'Archive for %s', 'CalPress' ), get_the_date() );
elseif ( is_month() ) :
printf( __( 'Archive for %s', 'CalPress' ), get_the_date('F Y') );
elseif ( is_year() ) :
printf( __( 'Archive for %s', 'CalPress' ), get_the_date('Y') );
else :
_e( 'Blog Archives', 'CalPress' );
endif;
?></h1>
</header>
<?php
rewind_posts();
get_template_part( 'loop', 'archive' );
?>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>