Archived topic
entry header problem
7 replies · Started by onalti on October 18, 2021
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.
Updated the code above:
https://generatepress.com/forums/topic/title-meta-question/#post-1967048
That should hook the archive title back in.
Thank you so much.
Glad to be of help