Site logo

[Support request] Multiple H1

Home Forums Support [Support request] Multiple H1

Home Forums Support Multiple H1

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #2283248
    Fernando
    Customer Support

    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.

    #2283253
    David

    That’s it!

    Nice answer Fernando.

    #2283255
    Fernando
    Customer Support

    You’re welcome David! Sorry again for the misunderstanding! Hope you have a nice day!

    #2283256
    David

    Well, that was nice. You too!

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.