Twenty Twelve: tag and category descriptions should not be part of h1 element. Props obenland, see #21255.

git-svn-id: http://core.svn.wordpress.org/trunk@21331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
lancewillett 2012-07-25 17:55:50 +00:00
parent c5acc52beb
commit 8b6122a94f
2 changed files with 42 additions and 24 deletions

View File

@ -18,29 +18,38 @@ get_header(); ?>
<div id="content" role="main"> <div id="content" role="main">
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
<h1 class="archive-title"><?php <header class="archive-header">
if ( is_day() ) { <h1 class="archive-title"><?php
printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); if ( is_day() ) {
} elseif ( is_month() ) { printf( __( 'Daily Archives: %s', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' );
printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); } elseif ( is_month() ) {
} elseif ( is_year() ) { printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' );
printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); } elseif ( is_year() ) {
} elseif ( is_tag() ) { printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' );
printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' ); } elseif ( is_tag() ) {
// Show an optional tag description printf( __( 'Tag Archives: %s', 'twentytwelve' ), '<span>' . single_tag_title( '', false ) . '</span>' );
$tag_description = tag_description(); } elseif ( is_category() ) {
if ( $tag_description ) printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' );
echo '<div class="tag-archive-meta">' . $tag_description . '</div>'; } else {
} elseif ( is_category() ) { _e( 'Blog Archives', 'twentytwelve' );
printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); }
// Show an optional category description ?></h1>
$category_description = category_description();
if ( $category_description ) <?php
echo '<div class="category-archive-meta">' . $category_description . '</div>'; // Show an optional tag description.
} else { if ( is_tag() ) {
_e( 'Blog Archives', 'twentytwelve' ); $tag_description = tag_description();
} if ( $tag_description )
?></h1> echo '<div class="archive-meta">' . $tag_description . '</div>';
}
// Show an optional category description.
if ( is_category() ) {
$category_description = category_description();
if ( $category_description )
echo '<div class="archive-meta">' . $category_description . '</div>';
}
?>
</header><!-- /. archive-header -->
<?php <?php
/* Start the Loop */ /* Start the Loop */

View File

@ -1072,7 +1072,7 @@ footer .edit-link {
/* =Styling for the archive view /* =Styling for the archive view
-------------------------------------------------------------- */ -------------------------------------------------------------- */
.archive #content .archive-title, .archive #content .archive-header,
.search .page-header { .search .page-header {
margin-bottom: 48px; margin-bottom: 48px;
margin-bottom: 3.428571429rem; margin-bottom: 3.428571429rem;
@ -1080,6 +1080,15 @@ footer .edit-link {
padding-bottom: 1.571428571rem; padding-bottom: 1.571428571rem;
border-bottom: 1px solid #ededed; border-bottom: 1px solid #ededed;
} }
.archive-meta {
color: #636363;
font-size: 11px;
font-size: 0.785714286rem;
line-height: 2.181818182;
margin-top: 22px;
margin-top: 1.571428571rem;
text-transform: uppercase;
}
/* =Styling for the single image attachment view /* =Styling for the single image attachment view