Changeset 22048 for trunk/wp-content/themes/twentytwelve/archive.php
- Timestamp:
- 09/27/2012 07:01:16 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentytwelve/archive.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/archive.php
r21992 r22048 7 7 * 8 8 * If you'd like to further customize these archive views, you may create a 9 * new template file for each specific one, like tag.php for Tag archives or 9 * new template file for each specific one. For example, Twenty Twelve already 10 * has tag.php for Tag archives, category.php for Category archives, and 10 11 * author.php for Author archives. 11 12 * … … 25 26 <header class="archive-header"> 26 27 <h1 class="archive-title"><?php 27 if ( is_day() ) {28 if ( is_day() ) : 28 29 printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); 29 } elseif ( is_month() ) {30 elseif ( is_month() ) : 30 31 printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); 31 } elseif ( is_year() ) {32 elseif ( is_year() ) : 32 33 printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); 33 } elseif ( is_tag() ) { 34 printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 35 } elseif ( is_category() ) { 36 printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 37 } else { 34 else : 38 35 _e( 'Archives', 'twentytwelve' ); 39 }36 endif; 40 37 ?></h1> 41 42 <?php43 // Show an optional tag description.44 if ( is_tag() ) {45 $tag_description = tag_description();46 if ( $tag_description )47 echo '<div class="archive-meta">' . $tag_description . '</div>';48 }49 // Show an optional category description.50 if ( is_category() ) {51 $category_description = category_description();52 if ( $category_description )53 echo '<div class="archive-meta">' . $category_description . '</div>';54 }55 ?>56 38 </header><!-- .archive-header --> 57 39
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)