|
1 <?php |
|
2 /** |
|
3 * The template for displaying Archive pages. |
|
4 * |
|
5 * Used to display archive-type pages if nothing more specific matches a query. |
|
6 * For example, puts together date-based pages if no date.php file exists. |
|
7 * |
|
8 * Learn more: http://codex.wordpress.org/Template_Hierarchy |
|
9 * |
|
10 * @package WordPress |
|
11 * @subpackage Twenty_Eleven |
|
12 * @since Twenty Eleven 1.0 |
|
13 */ |
|
14 |
|
15 get_header(); ?> |
|
16 |
|
17 <section id="primary"> |
|
18 <div id="content" role="main"> |
|
19 |
|
20 <?php if ( have_posts() ) : ?> |
|
21 |
|
22 <header class="page-header"> |
|
23 <h1 class="page-title"> |
|
24 <?php if ( is_day() ) : ?> |
|
25 <?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?> |
|
26 <?php elseif ( is_month() ) : ?> |
|
27 <?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?> |
|
28 <?php elseif ( is_year() ) : ?> |
|
29 <?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?> |
|
30 <?php else : ?> |
|
31 <?php _e( 'Blog Archives', 'twentyeleven' ); ?> |
|
32 <?php endif; ?> |
|
33 </h1> |
|
34 </header> |
|
35 |
|
36 <?php twentyeleven_content_nav( 'nav-above' ); ?> |
|
37 |
|
38 <?php /* Start the Loop */ ?> |
|
39 <?php while ( have_posts() ) : the_post(); ?> |
|
40 |
|
41 <?php |
|
42 /* Include the Post-Format-specific template for the content. |
|
43 * If you want to overload this in a child theme then include a file |
|
44 * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
|
45 */ |
|
46 get_template_part( 'content', get_post_format() ); |
|
47 ?> |
|
48 |
|
49 <?php endwhile; ?> |
|
50 |
|
51 <?php twentyeleven_content_nav( 'nav-below' ); ?> |
|
52 |
|
53 <?php else : ?> |
|
54 |
|
55 <article id="post-0" class="post no-results not-found"> |
|
56 <header class="entry-header"> |
|
57 <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> |
|
58 </header><!-- .entry-header --> |
|
59 |
|
60 <div class="entry-content"> |
|
61 <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> |
|
62 <?php get_search_form(); ?> |
|
63 </div><!-- .entry-content --> |
|
64 </article><!-- #post-0 --> |
|
65 |
|
66 <?php endif; ?> |
|
67 |
|
68 </div><!-- #content --> |
|
69 </section><!-- #primary --> |
|
70 |
|
71 <?php get_sidebar(); ?> |
|
72 <?php get_footer(); ?> |