Archived topic
H1 Header Blog
5 replies · Started by Julia on October 23, 2022
Dear Team,
I can't assign a H1 Header to my Blog.
Let me explain the Problem.
1. In the Theme Backend I have chosen the site that will be my Blog.
So the site is formatted automatically by generate press and I have no changing possibility.
https://www.ihrcoachinginstitut.de/blog-coaching-training-frankfurt/
Can you guys help?
Best regards,
Julia
Hi Julia,
The blog/posts page is automatically generated by WordPress and cannot be edited normally.
Are you trying to add an <h1>? If so try creating a block element page hero and assign it to the posts page:
https://docs.generatepress.com/article/block-element-page-hero/
Thanks LEO your help is very much appreciated!!!
No problem :)
Dear Leo,
Now MOZ PRO is showing me the error:
Duplicate Titles
First page of the BLOG:
https://www.ihrcoachinginstitut.de/blog-coaching-training-frankfurt/
Second Page of the BLOG:
https://www.ihrcoachinginstitut.de/blog-coaching-training-frankfurt/page/2/
Can you please support?
BTW - How do I add a picture for my forum profile?
Best,
Julia
Hi Julia,
To display a Header Element only on the first page of an Archive/Blog page, you'll need a custom PHP snippet. Reference: https://docs.generatepress.com/article/generate_element_display/#display-an-element-to-the-first-page-of-archives-only
Try something like this:
add_filter( 'generate_header_element_display', function( $display, $element_id ) {
if ( 100 === $element_id && is_paged() ) {
$display = false;
}
return $display;
}, 10, 2 );
Replace 100 with the ID of your Header Element.
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets