Make WordPress Core

Ticket #21255: 21255.diff

File 21255.diff, 1.9 KB (added by obenland, 11 years ago)

Addresses the archive.php part of the change. Style still missing.

  • wp-content/themes/twentytwelve/archive.php

     
    2626                                } elseif ( is_year() ) {
    2727                                        printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' );
    2828                                } 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>';
     29                                        printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' );       
    3430                                } elseif ( is_category() ) {
    3531                                        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>';
    4032                                } else {
    4133                                        _e( 'Blog Archives', 'twentytwelve' );
    4234                                }
    4335                        ?></h1>
    4436
    45                         <?php
     37                        <?php                   
     38                        if ( is_tag() ) {
     39                                // Show an optional tag description
     40                                $tag_description = tag_description();
     41                                if ( $tag_description )
     42                                        echo '<div class="tag-archive-meta">' . $tag_description . '</div>';
     43                        }
     44                       
     45                        if ( is_category() ) {
     46                                // Show an optional category description
     47                                $category_description = category_description();
     48                                if ( $category_description )
     49                                        echo '<div class="category-archive-meta">' . $category_description . '</div>';
     50                        }
     51                       
    4652                        /* Start the Loop */
    4753                        while ( have_posts() ) : the_post();
    4854