Changeset 19843
- Timestamp:
- 02/06/2012 10:37:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/archive.php
r19842 r19843 2 2 /** 3 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 4 9 * 5 10 * @package WordPress … … 16 21 17 22 <header class="page-header"> 18 <h1 class="page-title"> 19 <?php if ( is_day() ) : ?> 20 <?php printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); ?> 21 <?php elseif ( is_month() ) : ?> 22 <?php printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); ?> 23 <?php elseif ( is_year() ) : ?> 24 <?php printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); ?> 25 <?php elseif ( is_tag() ) : ?> 26 <?php 23 <h1 class="page-title"><?php 24 if ( is_day() ) { 25 printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); 26 } elseif ( is_month() ) { 27 printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); 28 } elseif ( is_year() ) { 29 printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); 30 } elseif ( is_tag() ) { 27 31 printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 28 32 // Show an optional tag description 29 33 $tag_description = tag_description(); 30 if ( ! empty( $tag_description ))34 if ( $tag_description ) 31 35 echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' ); 32 ?> 33 <?php elseif ( is_category() ) : ?> 34 <?php 36 } elseif ( is_category() ) { 35 37 printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 36 38 // Show an optional category description 37 39 $category_description = category_description(); 38 if ( ! empty( $category_description ))40 if ( $category_description ) 39 41 echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' ); 40 ?> 41 <?php else : ?> 42 <?php _e( 'Blog Archives', 'twentytwelve' ); ?> 43 <?php endif; ?> 44 </h1> 42 } else { 43 _e( 'Blog Archives', 'twentytwelve' ); 44 } 45 ?></h1> 45 46 </header> 46 47 47 <?php twentytwelve_content_nav( 'nav-above' ); ?> 48 <?php 49 twentytwelve_content_nav( 'nav-above' ); 50 51 /* Start the Loop */ 52 while ( have_posts() ) : the_post(); 48 53 49 <?php /* Start the Loop */ ?> 50 <?php while ( have_posts() ) : the_post(); ?> 51 <?php get_template_part( 'content', get_post_format() ); ?> 52 <?php endwhile; ?> 54 /* Include the post format-specific template for the content. If you want to 55 * this in a child theme then include a file called called content-___.php 56 * (where ___ is the post format) and that will be used instead. 57 */ 58 get_template_part( 'content', get_post_format() ); 53 59 54 <?php twentytwelve_content_nav( 'nav-below' ); ?> 60 endwhile; 61 62 twentytwelve_content_nav( 'nav-below' ); 63 ?> 55 64 56 65 <?php else : ?>
Note: See TracChangeset
for help on using the changeset viewer.