Ticket #17567: 17567.diff
| File 17567.diff, 4.9 KB (added by , 15 years ago) |
|---|
-
wp-content/themes/twentyeleven/tag.php
1 <?php2 /**3 * The template used to display Tag Archive pages4 *5 * @package WordPress6 * @subpackage Twenty_Eleven7 * @since Twenty Eleven 1.08 */9 10 get_header(); ?>11 12 <section id="primary">13 <div id="content" role="main">14 15 <?php the_post(); ?>16 17 <header class="page-header">18 <h1 class="page-title"><?php19 printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' );20 ?></h1>21 22 <?php23 $tag_description = tag_description();24 if ( ! empty( $tag_description ) )25 echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );26 ?>27 </header>28 29 <?php rewind_posts(); ?>30 31 <?php twentyeleven_content_nav( 'nav-above' ); ?>32 33 <?php /* Start the Loop */ ?>34 <?php while ( have_posts() ) : the_post(); ?>35 36 <?php37 /* Include the Post-Format-specific template for the content.38 * If you want to overload this in a child theme then include a file39 * called content-___.php (where ___ is the Post Format name) and that will be used instead.40 */41 get_template_part( 'content', get_post_format() );42 ?>43 44 <?php endwhile; ?>45 46 <?php twentyeleven_content_nav( 'nav-below' ); ?>47 48 </div><!-- #content -->49 </section><!-- #primary -->50 51 <?php get_sidebar(); ?>52 <?php get_footer(); ?> -
wp-content/themes/twentyeleven/category.php
1 <?php2 /**3 * The template for displaying Category Archive pages.4 *5 * @package WordPress6 * @subpackage Twenty_Eleven7 * @since Twenty Eleven 1.08 */9 10 get_header(); ?>11 12 <section id="primary">13 <div id="content" role="main">14 15 <header class="page-header">16 <h1 class="page-title"><?php17 printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );18 ?></h1>19 20 <?php21 $category_description = category_description();22 if ( ! empty( $category_description ) )23 echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );24 ?>25 </header>26 27 <?php twentyeleven_content_nav( 'nav-above' ); ?>28 29 <?php /* Start the Loop */ ?>30 <?php while ( have_posts() ) : the_post(); ?>31 32 <?php33 /* Include the Post-Format-specific template for the content.34 * If you want to overload this in a child theme then include a file35 * called content-___.php (where ___ is the Post Format name) and that will be used instead.36 */37 get_template_part( 'content', get_post_format() );38 ?>39 40 <?php endwhile; ?>41 42 <?php twentyeleven_content_nav( 'nav-below' ); ?>43 44 </div><!-- #content -->45 </section><!-- #primary -->46 47 <?php get_sidebar(); ?>48 <?php get_footer(); ?> -
wp-content/themes/twentyeleven/archive.php
26 26 */ 27 27 if ( have_posts() ) 28 28 the_post(); 29 30 if ( is_category() || is_tag() || is_tax() ) { 31 $term = get_queried_object(); 32 $taxonomy = get_taxonomy( $term->taxonomy ); 33 } 29 34 ?> 30 35 31 36 <header class="page-header"> … … 36 41 <?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); ?> 37 42 <?php elseif ( is_year() ) : ?> 38 43 <?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); ?> 44 <?php elseif ( is_category() || is_tag() || is_tax() ) : ?> 45 <?php 46 if ( isset( $taxonomy->labels->singular_name ) ) 47 $taxonomy_name = $taxonomy->labels->singular_name; 48 else 49 $taxonomy_name = __( 'Taxonomy', 'twentyeleven' ); 50 51 printf( __( '%1$s Archives: %2$s', 'twentyeleven' ), $taxonomy_name, '<span>' . single_term_title( '', false ) . '</span>' ); 52 ?> 39 53 <?php else : ?> 40 54 <?php _e( 'Blog Archives', 'twentyeleven' ); ?> 41 55 <?php endif; ?> 42 56 </h1> 57 58 <?php 59 if ( is_category() || is_tag() || is_tax() ) { 60 $term_description = term_description(); 61 if ( ! empty( $term_description ) ) 62 echo apply_filters( "{$term->taxonomy}_archive_meta", "<div class='{$term->taxonomy}-archive-meta'>$term_description</div>" ); 63 } 64 ?> 43 65 </header> 44 66 45 67 <?php