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/index.php

    r49826 r50802  
    1515 */
    1616
    17 get_header();
     17get_header(); ?>
     18
     19<?php if ( is_home() && ! is_front_page() && ! empty( single_post_title( '', false ) ) ) { ?>
     20    <header class="page-header alignwide">
     21        <h1 class="page-title"><?php single_post_title(); ?></h1>
     22    </header><!-- .page-header -->
     23<?php }
    1824
    1925if ( have_posts() ) {
Note: See TracChangeset for help on using the changeset viewer.