From e5c05e18a1c54e4189b86b9a8316304d03fbacd1 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 17 Apr 2017 10:09:43 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@40458 git-svn-id: http://core.svn.wordpress.org/trunk@40334 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyseventeen/style.css | 4 +++- .../twentyseventeen/template-parts/post/content-audio.php | 2 ++ .../template-parts/post/content-excerpt.php | 8 +++++++- .../template-parts/post/content-gallery.php | 2 ++ .../twentyseventeen/template-parts/post/content-image.php | 2 ++ .../twentyseventeen/template-parts/post/content-video.php | 2 ++ .../twentyseventeen/template-parts/post/content.php | 2 ++ wp-includes/version.php | 2 +- 8 files changed, 21 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/twentyseventeen/style.css b/wp-content/themes/twentyseventeen/style.css index da3791d578..7fadfda8a7 100644 --- a/wp-content/themes/twentyseventeen/style.css +++ b/wp-content/themes/twentyseventeen/style.css @@ -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; diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php index cf1788995b..0d6e648368 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php b/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php index 4ddc28ca0f..f1c4cbb6cc 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php @@ -30,7 +30,13 @@ - ', esc_url( get_permalink() ) ), '' ); ?> + ', esc_url( get_permalink() ) ), '' ); + } else { + the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); + } ?>
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php b/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php index e46e7c5582..00dca2da5b 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-image.php b/wp-content/themes/twentyseventeen/template-parts/post/content-image.php index 8568d92b10..c352668e91 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-image.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-image.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php index 1c3ef49242..ae24e16ca4 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content.php b/wp-content/themes/twentyseventeen/template-parts/post/content.php index a87f646c3f..64a1301196 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 161f6678c8..ff56c6c8d2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40434'; +$wp_version = '4.8-alpha-40458'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.