• I have switched to WP Twenty Twenty-One default theme and everything looks good.
    Except I cannot display the page title on the Home page. It shows when I edit the page, but when I view the page it does not show at all. Other page titles on the website are showing fine. Please suggest how to fix this problem.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • the cause is in /template-parts/content/content-page.php, in this section:

    <?php if ( ! is_front_page() ) : ?>
    		<header class="entry-header alignwide">
    			<?php get_template_part( 'template-parts/header/entry-header' ); ?>
    			<?php twenty_twenty_one_post_thumbnail(); ?>
    		</header>
    	<?php elseif ( has_post_thumbnail() ) : ?>
    		<header class="entry-header alignwide">
    			<?php twenty_twenty_one_post_thumbnail(); ?>
    		</header>
    	<?php endif; ?>

    to show the page title on the front page, change this section to:

    		<header class="entry-header alignwide">
    			<?php get_template_part( 'template-parts/header/entry-header' ); ?>
    			<?php twenty_twenty_one_post_thumbnail(); ?>
    		</header>
    	

    please consider to ask any further theme related questions in the theme’s dedicated forum at https://www.ads-software.com/support/theme/twentytwentyone

    Thread Starter slav2791

    (@slav2791)

    Thank you. I thought that it was just a setting in the control panel that had to be changed. But it looks like in Twenty twenty-one WP theme, the page title of the Home page is meant to be hidden. If I change the code as you suggest, the changes will disappear in the next theme update it seems, unless I make it a child theme. So I will just put a Header there with the page title instead.

    • This reply was modified 3 years, 10 months ago by slav2791.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page title not showing on Home page’ is closed to new replies.