Twenty Seventeen: Correct heading hierarchy for posts on the front page.
When the posts page is on the front page or within a front page section, the heading hierarchy for the individual post titles needs to be adjusted accordingly. Props joedolson, celloexpressions, davidakennedy. Fixes #40264. git-svn-id: https://develop.svn.wordpress.org/trunk@40458 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b55133da6e
commit
417e3945d2
@ -451,7 +451,8 @@ h1 {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
h2 {
|
||||
h2,
|
||||
.home.blog .entry-title {
|
||||
color: #666;
|
||||
font-size: 20px;
|
||||
font-size: 1.25rem;
|
||||
@ -3153,6 +3154,7 @@ object {
|
||||
}
|
||||
|
||||
h2,
|
||||
.home.blog .entry-title,
|
||||
.page .panel-content .recent-posts .entry-title {
|
||||
font-size: 26px;
|
||||
font-size: 1.625rem;
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
if ( is_single() ) {
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
} elseif ( is_front_page() && is_home() ) {
|
||||
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
|
||||
} else {
|
||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||
}
|
||||
|
@ -30,7 +30,13 @@
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
<?php if ( is_front_page() && ! is_home() ) {
|
||||
|
||||
// The excerpt is being displayed within a front page section, so it's a lower hierarchy than h2.
|
||||
the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );
|
||||
} else {
|
||||
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
|
||||
} ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-summary">
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
if ( is_single() ) {
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
} elseif ( is_front_page() && is_home() ) {
|
||||
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
|
||||
} else {
|
||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||
}
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
if ( is_single() ) {
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
} elseif ( is_front_page() && is_home() ) {
|
||||
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
|
||||
} else {
|
||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||
}
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
if ( is_single() ) {
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
} elseif ( is_front_page() && is_home() ) {
|
||||
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
|
||||
} else {
|
||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||
}
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
if ( is_single() ) {
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
} elseif ( is_front_page() && is_home() ) {
|
||||
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
|
||||
} else {
|
||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user