Make WordPress Core


Ignore:
Timestamp:
05/01/2021 06:12:22 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-One: Display page title as the H1 heading when a static page is selected as the "Posts page".

This ensures that the heading represents the content of the page. Previously, the site title was displayed instead.

Props sabernhardt, justinahinon, rianrietveld, mukesh27, francina, audrasjb, Boniu91.
Fixes #52938.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-branding.php

    r49994 r50802  
    2828        <?php if ( is_front_page() && ! is_paged() ) : ?>
    2929            <h1 class="<?php echo esc_attr( $header_class ); ?>"><?php echo esc_html( $blog_info ); ?></h1>
    30         <?php elseif ( is_front_page() || is_home() ) : ?>
     30        <?php elseif ( is_front_page() && ! is_home() ) : ?>
    3131            <h1 class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></h1>
    3232        <?php else : ?>
Note: See TracChangeset for help on using the changeset viewer.