Google it… there may be some differences of opinion here and there… But generally, Google looks at h1 tags as clues to what the page’s content is about. If you have multiple h1 tags with different keywords then it is difficult for Google to contextualize the page.
Best practice: one h1 tag with the keyword or theme you are trying to optimize for.
Also when I use Indexability check by Ryte / Yoast https://en.ryte.com/lp/yoast/ It shows multiple H1 on any one page as an error and suggest that it be fixed.
So why would WordPress want to add to this problem with H1 tags that show up in the page code like with this media-template.php file does?
That’s a back end page template and not displayed anywhere Google might look.
I did a Fetch as Google and you’re correct! Google does not pick it up.
I’m curious why the Indexability check by Ryte / Yoast https://en.ryte.com/lp/yoast/ finds it as an error?
I know when I changed the ”media-template.php” to
<h2><?php _e( 'Drop files to upload' ); ?></h2>
and let it re-analyze – The Ryte / Yoast Analyzer shows the issue as resolved.
I guess maybe their Analyzer is not so good.
Curious as to why Yoast recommends its use via the admin Dashboard?
1. DO NOT modify core files.
2. Ask the Yoast folk.
The core file was only modified to see if it resolved the issue… which it did. It was driving me crazy as I always (as good old fashion best practices) use only one ‘H1’ tag per page.
So, then I came across the ”media-template.php” ‘H1’ tag and made the change just to see… I mean even if I left it that way it would have been replaced in any core update most likely. Besides we’re just talking about an ‘H1’ tag… If just that would break WordPress; then boy do we really have issues.
It may be just me, but I don’t see why an ‘H1’ tag is necessary there anyway. An ‘H2’ would work just as well as a ”Drop files to upload” message.
BTW; Yoast claims (Just as W3C does) – Using one ‘H1’ tag is still a good/best practice; even with the onset of HTML5.
FROM YOAST:
‘H1’ is the title of the page or the blog post, and you should only use it once. The other headings can be used multiple times, as long as it makes sense. It’s a hierarchical structure, so before you use H3, you should have used H2…
W3C
It is worth noting that in their examples and their tutorials… W3C says to utilize only ONE instance of H1 per page.