Double H1 Issue on a Single Post

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12947
    Kovairkovair
    Member

    Hi,

    All the individual blog posts at Kovair Blog -http://www.kovair.com/blog/ show two H1 tags while I see the backend HTML tags of each post. SEOs say that we can have only 1 H1 tag on a page.

    For example, while browsing view-source:http://www.kovair.com/blog/top-5-reasons-for-maintaining-requirements-in-a-tool, it shows the first H1 tag by default – <h1 id=”site-title”><span></span></h1> and 2nd H1 tag is from the title of the post – <h1 class=”post-title entry-title”>Top 5 Reasons for Maintaining Requirements in a Tool</h1>

    I want to remove the first default one from all the individual posts and keep the 2nd one. I think that is how individual post in any WordPress Blog template works. Please guide as to how to fix that.

    #12997
    RaghavendraRaghavendra
    Moderator

    If you examine our demo site –

    https://www.livemeshthemes.com/enigmatic/blog-full-image/

    https://www.livemeshthemes.com/enigmatic/blog-post-right-sidebar/

    you can see that there is only one H1 tag in the source. Not sure how you are seeing double H1 tags. The function –

    function mo_site_title() {
        $heading_tag = (is_home() || is_front_page()) ? 'h1' : 'div';
    
    .....
    
    }
    

    in framework/functions/utility-functions.php file line number 21 does ensure there are no duplicate H1s. Can you pls check if the above code exists in your installation?

    #13087
    Kovairkovair
    Member
    This reply has been marked as private.
    #13105
    Kovairkovair
    Member

    Hi Meteorite,

    I just discovered that an H1 tag (<h1 id=”site-title”><span></span></h1> ) was added to the header.php file of Kovair blog.

    Now when I replaced that custom h1 tag with h2 tag ( for example, <h2 id=”site-title”><span></span></h2>) to fix the double H1 tag issue, the blog does not have a H1 tag altogether now. Another problem.

    Any idea about how can I add an H1 tag to Kovair blog that does not conflict with individual blog posts and their H1 tags? My objective is to link Kovair logo on Blog home page to the parent website URL – http://www.kovair.com as you see it now.

    Right now, the double H1 tag issue for individual posts is solved.

    #13192
    RaghavendraRaghavendra
    Moderator

    Sorry for the delayed reply. Looks like you have set the Posts Page in the Settings->Reading as the Blog page? WordPress for some reason treats both Posts Page as well as Front Page as “Home” page (hence is_home() becomes true) and that confuses the framework to thinking that the blog page is in fact a home page. Have you checked what happens if you omit setting the Posts Page? Just do not have any page selected there.

    If you check the demo site of ours – https://www.livemeshthemes.com/enigmatic/blog/ we have a H1 tag as well and we the site title is a div and not a H1. Hope this addresses the issue.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Enigmatic Theme Support’ is closed to new topics and replies.