• Resolved njdiaries

    (@njdiaries)


    Hi,

    Please help me here. My website SEO analysis says H1 headings are missing. It seems all Blog title are H2 tags. How can I enable H1 tag within this theme..

    My website is – njdiaries
    Using – Morphology Lite

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Shaped Pixels

    (@shaped-pixels)

    For the blog home page, the h2 headings are common…it’s the “full post” that is more important, which has the h1 headings, same as the static pages have h1. Trust me, not to worry ??

    Thread Starter njdiaries

    (@njdiaries)

    Hey.. Thanks for reply.. Then why Bing webmaster says H1 Tag missing and its critical.

    Thread Starter njdiaries

    (@njdiaries)

    The <h1> tag is missing.

    Recommended Action:
    Add a header to the page by using a <h1> tag and place it within the <body> of the page source. Example: <h1>A precise and descriptive headline for the page</h1>.

    SEO Explanation:
    The <h1> tag is an indicator to Bingbot and web visitors of what the body copy’s primary theme or topic is. The <h1> tag reinforces the core keyword(s) found in the title, description, and the body copy. We recommend that the <h1> tag includes keywords that reflect the contents of the page and that it is not longer than approximately 150 characters in length.

    Theme Author Shaped Pixels

    (@shaped-pixels)

    The only way to change it if you still need that H1 is to create a child theme, then copy over a file to it and then change the h2 to an h3. The file you would copy over is:

    /inc/template-tags.php

    Around line 39 is this:

    echo '<h2 class="entry-title" itemprop="headline"><a href="' .esc_url( get_permalink() ) .'" rel="bookmark">';			
    if(the_title( '', '', false ) !='') the_title(); 
    else _e('Untitled', 'morphology-lite'); 
    echo '</a></h2>';

    Change the h2 to an h1.

    When copying over this file, make sure it’s in an “inc” named folder as well, just like the parent (original) theme.

    More about child theme creation can be read here:

    https://codex.www.ads-software.com/Child_Themes

    Thread Starter njdiaries

    (@njdiaries)

    Hi Shaped,

    Thank you for replying. I did the same. I created a child theme and created inc folder and then moved template-tag.php into it. Edited the Line 39 to H1 as well but it did not solve the issue. The blogs titles are still showing as H2. Please suggest if I missed to do anything.

    echo ‘<h1 class=”entry-title” itemprop=”headline”>‘;
    if(the_title( ”, ”, false ) !=”) the_title();
    else _e(‘Untitled’, ‘morphology-lite’);
    echo ‘
    </h1>’;

    Regards, Niraj

    Theme Author Shaped Pixels

    (@shaped-pixels)

    Sorry…my fault. Forgot about something…delete the copied template-tags.php from your child theme then copy this into your child theme’s own functions.php file:

    function morphology_lite_entry_titles() { 
    if ( is_single() ) :	
            echo '<h1 class="entry-title" itemprop="headline">';		
    		if(the_title( '', '', false ) !='') the_title(); 
    			else _e('Untitled', 'morphology-lite'); 
    	echo '</h1>';	  
     else :		
    	echo '<h1 class="entry-title" itemprop="headline"><a href="' .esc_url( get_permalink() ) .'" rel="bookmark">';			
    	if(the_title( '', '', false ) !='') the_title(); 
    		else _e('Untitled', 'morphology-lite'); 
    	echo '</a></h1>';	  
     endif;
    }

    I’ve already changed the h2’s to h1’s.

    To override the parent function you need to add the same function into your child themes functions.php, so I took the function that you see above and copied it over.

    • This reply was modified 8 years, 2 months ago by Shaped Pixels.
    Thread Starter njdiaries

    (@njdiaries)

    Hey.. Thank you ! That solved the problem.. Appreciate your help.. Keep up the good work..

    Cheers !

    Prezados,
    Estou tentando trabalhar com as regras das tqg h1, mas ainda n?o compreendi como proceder, ou seja: Onde eu devo inserir a marca <h1> para inserir o título?
    Obrigado.

    Juvino Ribeiro
    comocriarumblogsemdemora.com

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘My Website SEO says H1 TAG is missing.’ is closed to new replies.