| 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> |
| 44 | | |
| | 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 | if ( is_tag() ) { |
| | 40 | // Show an optional tag description |
| | 41 | $tag_description = tag_description(); |
| | 42 | if ( $tag_description ) |
| | 43 | echo '<div class="tag-archive-meta">' . $tag_description . '</div>'; |
| | 44 | } |
| | 45 | |
| | 46 | if ( is_category() ) { |
| | 47 | // Show an optional category description |
| | 48 | $category_description = category_description(); |
| | 49 | if ( $category_description ) |
| | 50 | echo '<div class="category-archive-meta">' . $category_description . '</div>'; |
| | 51 | } |
| | 52 | ?> |
| | 53 | </header> |
| | 54 | |