Archived topic
Multiple H1
18 replies · Started by David on July 14, 2022
Viewing posts 16–19 of 19
GeneratePress sets the site header as H1 when the front page is set as the blog page.
You may modify this behavior through a filter. Can you try adding this PHP snippet:
add_filter( 'generate_site_title_output', function( $output ) {
return sprintf(
'<%1$s class="main-title"%4$s>
<a href="%2$s" rel="home">
%3$s
</a>
</%1$s>',
'p',
esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
get_bloginfo( 'name' ),
'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
);
});
Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets
Kindly let us know how it goes.
That's it!
Nice answer Fernando.
You’re welcome David! Sorry again for the misunderstanding! Hope you have a nice day!
Well, that was nice. You too!
This archived topic is closed to new replies.