Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 97 lines (75 sloc) 3.173 kB
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
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
752d08a Update the HTML "class" system
Matias authored
13 <section id="primary" class="content-area">
14 <div id="content" class="site-content" role="main">
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
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
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() ) {
d5b3374 @ianstewart _s: incorporating the author template into the archive template to re…
ianstewart authored
28 /* Queue the first post, that way we know
29 * what author we're dealing with (if that is the case).
30 */
31 the_post();
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored
32 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>' );
d5b3374 @ianstewart _s: incorporating the author template into the archive template to re…
ianstewart authored
33 /* Since we called the_post() above, we need to
34 * rewind the loop back to the beginning that way
35 * we can run the loop properly, in full.
36 */
37 rewind_posts();
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored
38
39 } elseif ( is_day() ) {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
40 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
41
42 } elseif ( is_month() ) {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
43 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
44
45 } elseif ( is_year() ) {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
46 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
47
48 } else {
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
49 _e( 'Archives', '_s' );
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored
50
51 }
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
52 ?>
53 </h1>
73ffdba @ianstewart _s: With so little variation among date archive, category arhive, and…
ianstewart authored
54 <?php
55 if ( is_category() ) {
56 // show an optional category description
57 $category_description = category_description();
58 if ( ! empty( $category_description ) )
59 echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
60
61 } elseif ( is_tag() ) {
62 // show an optional tag description
63 $tag_description = tag_description();
64 if ( ! empty( $tag_description ) )
65 echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
66 }
67 ?>
b9fa5c0 @obenland Add missing 'class' comments
obenland authored
68 </header><!-- .page-header -->
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
69
70 <?php _s_content_nav( 'nav-above' ); ?>
71
72 <?php /* Start the Loop */ ?>
73 <?php while ( have_posts() ) : the_post(); ?>
74
75 <?php
76 /* Include the Post-Format-specific template for the content.
77 * If you want to overload this in a child theme then include a file
78 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
79 */
80 get_template_part( 'content', get_post_format() );
81 ?>
82
83 <?php endwhile; ?>
84
85 <?php _s_content_nav( 'nav-below' ); ?>
86
87 <?php else : ?>
88
43ea44c @ianstewart _s: Simplifying search, index, and archive, with a common no posts fo…
ianstewart authored
89 <?php get_template_part( 'no-results', 'archive' ); ?>
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
90
91 <?php endif; ?>
92
752d08a Update the HTML "class" system
Matias authored
93 </div><!-- #content .site-content -->
94 </section><!-- #primary .content-area -->
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored
95
96 <?php get_sidebar(); ?>
97 <?php get_footer(); ?>
Something went wrong with that request. Please try again.