Skip to content
Newer
Older
100644 99 lines (75 sloc) 3.1 KB
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
1 <?php
2 /**
3 * The template for displaying Archive pages.
4 *
5 * Learn more: http://codex.wordpress.org/Template_Hierarchy
6 *
7 * @package _s
8 * @since _s 1.0
9 */
10
11 get_header(); ?>
12
13 <section id="primary">
14 <div id="content" role="main">
15
16 <?php if ( have_posts() ) : ?>
17
18 <header class="page-header">
19 <h1 class="page-title">
20 <?php
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored Jan 12, 2012
21 if ( is_category() ) {
22 printf( __( 'Category Archives: %s', '_s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
23
24 } elseif ( is_tag() ) {
25 printf( __( 'Tag Archives: %s', '_s' ), '<span>' . single_tag_title( '', false ) . '</span>' );
26
27 } elseif ( is_author() ) {
28 printf( __( 'Author Archives: %s', '_s' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
29
30 } elseif ( is_day() ) {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
31 printf( __( 'Daily Archives: %s', '_s' ), '<span>' . get_the_date() . '</span>' );
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored Jan 12, 2012
32
33 } elseif ( is_month() ) {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
34 printf( __( 'Monthly Archives: %s', '_s' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored Jan 12, 2012
35
36 } elseif ( is_year() ) {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
37 printf( __( 'Yearly Archives: %s', '_s' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored Jan 12, 2012
38
39 } else {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
40 _e( 'Archives', '_s' );
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored Jan 12, 2012
41
42 }
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
43 ?>
44 </h1>
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored Jan 12, 2012
45 <?php
46 if ( is_category() ) {
47 // show an optional category description
48 $category_description = category_description();
49 if ( ! empty( $category_description ) )
50 echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
51
52 } elseif ( is_tag() ) {
53 // show an optional tag description
54 $tag_description = tag_description();
55 if ( ! empty( $tag_description ) )
56 echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
57 }
58 ?>
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
59 </header>
60
61 <?php rewind_posts(); ?>
62
63 <?php _s_content_nav( 'nav-above' ); ?>
64
65 <?php /* Start the Loop */ ?>
66 <?php while ( have_posts() ) : the_post(); ?>
67
68 <?php
69 /* Include the Post-Format-specific template for the content.
70 * If you want to overload this in a child theme then include a file
71 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
72 */
73 get_template_part( 'content', get_post_format() );
74 ?>
75
76 <?php endwhile; ?>
77
78 <?php _s_content_nav( 'nav-below' ); ?>
79
80 <?php else : ?>
81
82 <article id="post-0" class="post no-results not-found">
83 <header class="entry-header">
84 <h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
85 </header><!-- .entry-header -->
86
87 <div class="entry-content">
88 <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', '_s' ); ?></p>
89 <?php get_search_form(); ?>
90 </div><!-- .entry-content -->
91 </article><!-- #post-0 -->
92
93 <?php endif; ?>
94
95 </div><!-- #content -->
96 </section><!-- #primary -->
97
98 <?php get_sidebar(); ?>
99 <?php get_footer(); ?>
Something went wrong with that request. Please try again.