Changeset 21331 for trunk/wp-content/themes/twentytwelve/archive.php
- Timestamp:
- 07/25/2012 05:55:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/archive.php
r21268 r21331 19 19 20 20 <?php if ( have_posts() ) : ?> 21 <h1 class="archive-title"><?php 22 if ( is_day() ) { 23 printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); 24 } elseif ( is_month() ) { 25 printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); 26 } elseif ( is_year() ) { 27 printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); 28 } elseif ( is_tag() ) { 29 printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 30 // Show an optional tag description 31 $tag_description = tag_description(); 32 if ( $tag_description ) 33 echo '<div class="tag-archive-meta">' . $tag_description . '</div>'; 34 } elseif ( is_category() ) { 35 printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 36 // Show an optional category description 37 $category_description = category_description(); 38 if ( $category_description ) 39 echo '<div class="category-archive-meta">' . $category_description . '</div>'; 40 } else { 41 _e( 'Blog Archives', 'twentytwelve' ); 42 } 43 ?></h1> 21 <header class="archive-header"> 22 <h1 class="archive-title"><?php 23 if ( is_day() ) { 24 printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); 25 } elseif ( is_month() ) { 26 printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); 27 } elseif ( is_year() ) { 28 printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); 29 } elseif ( is_tag() ) { 30 printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 31 } elseif ( is_category() ) { 32 printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 33 } else { 34 _e( 'Blog Archives', 'twentytwelve' ); 35 } 36 ?></h1> 37 38 <?php 39 // Show an optional tag description. 40 if ( is_tag() ) { 41 $tag_description = tag_description(); 42 if ( $tag_description ) 43 echo '<div class="archive-meta">' . $tag_description . '</div>'; 44 } 45 // Show an optional category description. 46 if ( is_category() ) { 47 $category_description = category_description(); 48 if ( $category_description ) 49 echo '<div class="archive-meta">' . $category_description . '</div>'; 50 } 51 ?> 52 </header><!-- /. archive-header --> 44 53 45 54 <?php
Note: See TracChangeset
for help on using the changeset viewer.