Site logo

Archived topic

entry header problem

7 replies · Started by onalti on October 18, 2021

Viewing posts 1–8 of 8

When I add Element Add > Header Page Hero content {{post_title}}.
page and archive
<header class="page-header">
Deleting <h1 class="entry-title" itemprop="headline">. Is there a way to show this again?

Hi there,

you can try adding this snippet to force the title to be displayed regardless:

add_action( 'wp', function() {
    add_filter( 'generate_show_title', '__return_true', 20 );
    add_action( 'generate_archive_title', 'generate_archive_title', 20 );
} );

Or alternatively if you use a Block Element - Page Hero you have the option to disable the title:

https://docs.generatepress.com/article/block-element-page-hero/

thank you. but custom post type does not appear on pages and archives.

but custom post type does not appear on pages and archives.

Can you explain ?

Thanks David. Didn't work for Custom Post Types Archive Page :( get_the_archive_title is not displayed.

Thank you so much.

Glad to be of help

This archived topic is closed to new replies.