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. Merges [40458] to the 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@40459 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
97572ef88b
commit
a785107bf4
|
@ -451,7 +451,8 @@ h1 {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2,
|
||||||
|
.home.blog .entry-title {
|
||||||
color: #666;
|
color: #666;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
|
@ -3145,6 +3146,7 @@ object {
|
||||||
}
|
}
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
|
.home.blog .entry-title,
|
||||||
.page .panel-content .recent-posts .entry-title {
|
.page .panel-content .recent-posts .entry-title {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-size: 1.625rem;
|
font-size: 1.625rem;
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
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 {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,13 @@
|
||||||
</div><!-- .entry-meta -->
|
</div><!-- .entry-meta -->
|
||||||
<?php endif; ?>
|
<?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 -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
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 {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
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 {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
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 {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
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 {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7.4-alpha-40435';
|
$wp_version = '4.7.4-alpha-40459';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue