Ticket #21951: 21951.diff
File 21951.diff, 8.8 KB (added by , 12 years ago) |
---|
-
tag.php
1 <?php 2 /** 3 * The template for displaying Tag pages. 4 * 5 * Used to display archive-type pages for posts in a tag. 6 * 7 * Learn more: http://codex.wordpress.org/Template_Hierarchy 8 * 9 * @package WordPress 10 * @subpackage Twenty_Twelve 11 * @since Twenty Twelve 1.0 12 */ 13 14 get_header(); ?> 15 16 <section id="primary" class="site-content"> 17 <div id="content" role="main"> 18 19 <?php if ( have_posts() ) : ?> 20 <header class="archive-header"> 21 <h1 class="archive-title"><?php printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?></h1> 22 23 <?php 24 // Show an optional tag description. 25 $tag_description = tag_description(); 26 if ( $tag_description ) 27 echo '<div class="archive-meta">' . $tag_description . '</div>'; 28 ?> 29 </header><!-- .archive-header --> 30 31 <?php 32 /* Start the Loop */ 33 while ( have_posts() ) : the_post(); 34 35 /* Include the post format-specific template for the content. If you want to 36 * this in a child theme then include a file called called content-___.php 37 * (where ___ is the post format) and that will be used instead. 38 */ 39 get_template_part( 'content', get_post_format() ); 40 41 endwhile; 42 43 twentytwelve_content_nav( 'nav-below' ); 44 ?> 45 46 <?php else : ?> 47 <?php get_template_part( 'content', 'none' ); ?> 48 <?php endif; ?> 49 50 </div><!-- #content --> 51 </section><!-- #primary --> 52 53 <?php get_sidebar(); ?> 54 <?php get_footer(); ?> 55 No newline at end of file -
category.php
1 <?php 2 /** 3 * The template for displaying Category pages. 4 * 5 * Used to display archive-type pages for posts in a category. 6 * 7 * Learn more: http://codex.wordpress.org/Template_Hierarchy 8 * 9 * @package WordPress 10 * @subpackage Twenty_Twelve 11 * @since Twenty Twelve 1.0 12 */ 13 14 get_header(); ?> 15 16 <section id="primary" class="site-content"> 17 <div id="content" role="main"> 18 19 <?php if ( have_posts() ) : ?> 20 <header class="archive-header"> 21 <h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1> 22 23 <?php 24 // Show an optional category description. 25 $category_description = category_description(); 26 if ( $category_description ) 27 echo '<div class="archive-meta">' . $category_description . '</div>'; 28 ?> 29 </header><!-- .archive-header --> 30 31 <?php 32 /* Start the Loop */ 33 while ( have_posts() ) : the_post(); 34 35 /* Include the post format-specific template for the content. If you want to 36 * this in a child theme then include a file called called content-___.php 37 * (where ___ is the post format) and that will be used instead. 38 */ 39 get_template_part( 'content', get_post_format() ); 40 41 endwhile; 42 43 twentytwelve_content_nav( 'nav-below' ); 44 ?> 45 46 <?php else : ?> 47 <?php get_template_part( 'content', 'none' ); ?> 48 <?php endif; ?> 49 50 </div><!-- #content --> 51 </section><!-- #primary --> 52 53 <?php get_sidebar(); ?> 54 <?php get_footer(); ?> 55 No newline at end of file -
date.php
1 <?php 2 /** 3 * The template for displaying Date pages. 4 * 5 * Used to display archive-type pages for daily, monthly, and yearly archives. 6 * 7 * Learn more: http://codex.wordpress.org/Template_Hierarchy 8 * 9 * @package WordPress 10 * @subpackage Twenty_Twelve 11 * @since Twenty Twelve 1.0 12 */ 13 14 get_header(); ?> 15 16 <section id="primary" class="site-content"> 17 <div id="content" role="main"> 18 19 <?php if ( have_posts() ) : ?> 20 <header class="archive-header"> 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 else 29 _e( 'Blog Archives', 'twentytwelve' ); 30 ?></h1> 31 </header><!-- .archive-header --> 32 33 <?php 34 /* Start the Loop */ 35 while ( have_posts() ) : the_post(); 36 37 /* Include the post format-specific template for the content. If you want to 38 * this in a child theme then include a file called called content-___.php 39 * (where ___ is the post format) and that will be used instead. 40 */ 41 get_template_part( 'content', get_post_format() ); 42 43 endwhile; 44 45 twentytwelve_content_nav( 'nav-below' ); 46 ?> 47 48 <?php else : ?> 49 <?php get_template_part( 'content', 'none' ); ?> 50 <?php endif; ?> 51 52 </div><!-- #content --> 53 </section><!-- #primary --> 54 55 <?php get_sidebar(); ?> 56 <?php get_footer(); ?> 57 No newline at end of file -
taxonomy.php
1 <?php 2 /** 3 * The template for displaying taxonomy pages. 4 * 5 * Used to display archive-type pages for posts in a taxonomy. 6 * Categories and tags are types of taxonomies, and are handled 7 * through category.php and tag.php instead. A theme or plugin 8 * could add more taxonomies. 9 * 10 * Learn more: http://codex.wordpress.org/Template_Hierarchy 11 * 12 * @package WordPress 13 * @subpackage Twenty_Twelve 14 * @since Twenty Twelve 1.0 15 */ 16 17 get_header(); ?> 18 19 <section id="primary" class="site-content"> 20 <div id="content" role="main"> 21 22 <?php if ( have_posts() ) : ?> 23 <header class="archive-header"> 24 <h1 class="archive-title"><?php printf( __( 'Archives: %s', 'twentytwelve' ), '<span>' . single_term_title( '', false ) . '</span>' ); ?></h1> 25 26 <?php 27 // Show an optional term description. 28 $term_description = term_description(); 29 if ( $term_description ) 30 echo '<div class="archive-meta">' . $term_description . '</div>'; 31 ?> 32 </header><!-- .archive-header --> 33 34 <?php 35 /* Start the Loop */ 36 while ( have_posts() ) : the_post(); 37 38 /* Include the post format-specific template for the content. If you want to 39 * this in a child theme then include a file called called content-___.php 40 * (where ___ is the post format) and that will be used instead. 41 */ 42 get_template_part( 'content', get_post_format() ); 43 44 endwhile; 45 46 twentytwelve_content_nav( 'nav-below' ); 47 ?> 48 49 <?php else : ?> 50 <?php get_template_part( 'content', 'none' ); ?> 51 <?php endif; ?> 52 53 </div><!-- #content --> 54 </section><!-- #primary --> 55 56 <?php get_sidebar(); ?> 57 <?php get_footer(); ?> 58 No newline at end of file -
archive.php
19 19 20 20 <?php if ( have_posts() ) : ?> 21 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 ?> 22 <h1 class="archive-title"><?php _e( 'Archives', 'twentytwelve' ); ?></h1> 52 23 </header><!-- .archive-header --> 53 24 54 25 <?php