Site logo

Archived topic

blog page missing H1 tag

12 replies · Started by siddharth on September 3, 2019

Viewing posts 1–13 of 13

Blog page missing H1 tag. SEO tools showing error that h1 tag absent on blog page.

Make site title visible, then h1 available ............

i faced same issue....

if you don't want site title visble, then hide with css - use display none for site title class....

This is a small snag in GP !!!

site title is visible...still H1 tag not showing

Hi there,

add this PHP snippet and it will make your Site Title the H1 on the blog page:

add_filter( 'generate_site_title_output', function() {
    return sprintf(
        '<%1$s class="main-title" itemprop="headline">
            <a href="%2$s" rel="home">
                %3$s
            </a>
         </%1$s>',
         ( is_home() ) ? 'h1' : 'p',
         esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
         get_bloginfo( 'name' )
    );
} );

I'll have a word with Tom to see if there is anything to make this happen automatically on a separate Blog page

Thanks David...Let me know if this happen automatically.

If you add the code it will automatically add H1 around your Site Title ( in the Navigation Bar )

It's not possible to add an <h1> tag for the logo image unfortunately as it's not text.

Couple solutions that might work for you:

- Instead of using a logo image that includes the logo and site title, you can consider having them separated and use the Place logo next to title option:
https://docs.generatepress.com/article/place-logo-next-to-title/

- Add a header element that has <h1> in it:
https://docs.generatepress.com/article/header-element-overview/

Let me know :)

Thanks it works :-)

Awesome :)

hello i am having the same issues, H1 tag is missing.. i hid the site title because i dont want it appearing.. please help and why is the SEO Checker finding a non index on my site - ...

This archived topic is closed to new replies.