• Resolved haryanvi

    (@haryanvi)


    bing webmaster and other seo tools says that h1 tag is missing.
    i have only style.css and functions.php available
    now, i have tried many codes on GP forums and on other sites but none of them is working.
    i have hidden site title and description and when i unhide them, h1 tag is there but not there otherwise.
    also none of the codes worked except a few but then site title appeared alongwith h1 tag.
    i just want to keep logo and h1 tag with site title and description hidden.

    using this tool to analyse
    https://www.seoreviewtools.com/html-headings-checker/

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    Typically, the site title is the H1 on the blog page. However, you’re using a logo, so you can just add a function like this:

    add_action( 'generate_before_main_content', function() {
        if ( ! is_home() ) {
            return;
        }
        ?>
            <h1>Blog</h1>
        <?php
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Thread Starter haryanvi

    (@haryanvi)

    Now site title appeared below the navigation menu bar. if i want only logo. if showing title was my preference, i could have just untick the option of hiding title in customizer.

    Theme Author Tom

    (@edge22)

    I’m not sure I understand? The code above adds a <h1> element to your page. You can make it say whatever you like.

    Is there somewhere else you want to place it?

    Thread Starter haryanvi

    (@haryanvi)

    Well, like many websites where they use logo only instead of title and description and still having h1 tag, i don’t know how! may be placing in logo or somewhere, where h1 tag is seen by search engines but invisible to visitors.

    but like you said, i can make it whatever i like, so that would be fine too. i will name it something like, welcome or latest etc.

    Theme Author Tom

    (@edge22)

    I think those sites would use a method as I provided above.

    Proving an H1 only for search engines is frowned upon by Google and can even result in them penalizing you.

    Adding a visible H1 that’s helpful for visitors of your site is the way to go. I like the “Latest” text you added 🙂

    Thread Starter haryanvi

    (@haryanvi)

    Thank you 😊

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘h1 tag missing’ is closed to new replies.