WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/17/2017 10:08:55 AM (2 years ago)
Author:
swissspidy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content.php

    r39618 r40458  
    3434        if ( is_single() ) {
    3535            the_title( '<h1 class="entry-title">', '</h1>' );
     36        } elseif ( is_front_page() && is_home() ) {
     37            the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
    3638        } else {
    3739            the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
Note: See TracChangeset for help on using the changeset viewer.