SEO Reports Show No h1 tag in use


#1

Hey there!

Even after reviewing the other forum suggestions, adding the correct hierarchy tags to my page is still a mystery. These listed SEO reports show I’m not using <h1> tags or not using them correctly: https://my.onpage.org and http://nibbler.silktide.com/en_US/reports/www.pawsinmotionla.com and https://seositecheckup.com/seo-audit/pawsinmotionla.com

I’m guessing this is because I’m not showing my Site Title or Subtitle and only using my logo in the header but maybe you can suggest a fix. Thanks!


#2

Hello there,

> I’m guessing this is because I’m not showing my Site Title or Subtitle and only using my logo in the header but maybe you can suggest a fix.

Since the site logo is set, the site title H1 tag is altered with it. To pretend your site remains having this H1 tag, you have to edit the header.php file in child theme mode. Insert this code:


<h1 class="site-title" style="position:absolute; top:-9999px;"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

after this line:


<?php if ( get_theme_mod('site_logo') ) : ?>

If you haven’t yet run a child theme, you might be interested to use our premade Sydney child theme that can be downloaded from this link.

Regards,
Kharis


#3

Okay, done and done.
Bad news though: I’m still getting the same error from the site validators. (Thanks for the pre-built child theme!)

Can we just convert the h2 tags to being the h1 tags or will that really mess things up?


Passionate
H2

Dedicated
H2

Flexible Times
H2

Purely Delightful
H2

Professional
H2

Voted Best Pet Service of 2016
H3

Our services
H3

60 Minute Dog Run : $40
H3

90 Minute Dog Run : $60
H3

60 Minute Trail Hike : $32
H3


#4

Hello there,

I checked your site with another tool. It is displaying there is no issue with the H1 tag; it detects the new H1 tag you inserted. Please check with this tool: http://www.seoreviewtools.com/html-headings-checker/.

The tool you used might have cache system that’s why it won’t read the change you’ve done.

Regards,
Kharis


#5

Hello Kharis,
I´m having the same issue with my website. I checked it with many SEO tools (including one that you suggested in another forum) but all of them say the same: I have no h1 tag and a lot of h2 tags.

Could you help me to fix it? The website is: http://www.lorennaeunapio.com

Thanks very much in advance,
Lorenna


#6

Hello Lorenna,

I would like to apologize in advance for the long delay.

Since you’re running Astrid theme, which has different markup with Sydney, to achieve the same result, you can add the below function into your child theme’s functions.php file or you can use the My Custom Functions plugin.


add_action('get_custom_logo', 'astrid_child_logo_image', 2, 10);
function astrid_child_logo_image($html, $blog_id) {

	$html = '';

	$custom_logo_id = get_theme_mod( 'custom_logo' );

	// We have a logo. Logo is go.
	if ( $custom_logo_id ) {
		$html  = '';
		$html .= sprintf( '<h1 class="site-title" style="position:absolute; top:-9999px;"><a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%3$s</a></h1><a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
			esc_url( home_url( '/' ) ),
			wp_get_attachment_image( $custom_logo_id, 'full', false, array(
				'class'    => 'custom-logo',
				'itemprop' => 'logo',
			) ),
			get_bloginfo( 'name' )
		);
	}

	return $html;

}

Regards,
Kharis


#7

Hello, Kharis.

Thanks for your answer.
I tried the code you sent at the plugin but it still not working. I keep not having H1 tag and 6 H2 tags. I should paste the code exactly as you sent me, right? Or should I change something?

Thank you very much!


#8

Hi Lorenna,

Could you please confirm if the custom function has been turned on?

Regards,
Kharis


#9

Hi Kharis,

Yes, I turned it on/off twice and waited 24 hours but it is still not working.

Thanks!


#10

Could you please confirm if you’re running the latest version of Astrid theme?

Regards,
Kharis


#11

Hi Kharis,

I´m running the version 1.04. Is this the latest one? No updates requests appear on my dashboard, so I´m assuming this is the latest version, right?

Thank you very much!


#12

Hello there,

Please share me the admin access to your site, if you want me to this task for you. If so, you can share the username and password along with the login URL to your site’s admin (/wp-admin) to my email kharisblank@gmail.com. Mention the link to this topic in your email body.

Regards,
Kharis


#13

Hi Kharis,
I have the same problem showing no h1 tag on my home page: https://www.isabelkurz.com
I inserted the code you mentioned in my sydney header.php but it still does not show a h1 tag.
(seo tool says that the h2 tag is used twice for “Virtuelle Assistenz”, which is pretty weird).

<?php if ( get_theme_mod(‘site_logo’) ) : ?>
<h1 class=“site-title” style=“position:absolute; top:-9999px;”>" rel=“home”><?php bloginfo( ‘name’ ); ?></h1>
" title="<?php bloginfo(‘name’); ?>">" alt="<?php bloginfo(‘name’); ?>" />
<?php else : ?>

Thanks so much in advance for your help, much appreciated.
Best, Isabel


#14

Hello there,

I inspected your site, the H1 tag is really there, but it’s visually hidden. To verify, you can use this tool to check heading tags in your site.

Regards,
Kharis


#15

Thanks so much for your quick response. Actually I would like to have the h1 tag instead the h2 tag for “Virtuelle Assistenz”. Could you help me here, is there a code to change it?
Thank you!


#16

Sorry, I couldn’t exactly get it. Did you mean this one?

Regards,
Kharis


#17

yes, exactly, sorry for the confusing explanation :wink:


#18

I changed this h2 tag into a h1 tag in the slider.php, but it’s still not showing a h1. Do I have to change it somewhere else? Thanks so much


#19

Did you edit it in child theme? If so, please share that file to https://gist.github.com and post its link here, so I can inspect it.

Regards,
Kharis


#20

Yes, I did edit it in the child theme:
https://gist.github.com/anonymous/e3938acaefebe76f3bd33389d5d2906c

Thank you for checking