Site logo

Archived topic

H1 Header Blog

5 replies · Started by Julia on October 23, 2022

Viewing posts 1–6 of 6

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

Thanks LEO your help is very much appreciated!!!

No problem :)

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

This archived topic is closed to new replies.