- This topic has 13 replies, 4 voices, and was last updated 4 months, 3 weeks ago by Leo.
July 22, 2020 at 9:00 am #1372384Andrew
I seem to have multiple H1 tags on my homepage. The first one seems to be the correct one – It has taken my site title and put it as the H1 tag. The second H1 tag seems to be a duplicate of that and just below the first one but has put it in a “navigation-branding” div class for some reason.
On single post and pages, it’s fine – There is only one H1 tag.
Please help. Thanks in advance. 🙂July 22, 2020 at 9:36 am #1372426LeoStaffCustomer SupportJuly 22, 2020 at 10:09 am #1372467Andrew
Thanks for the reply.
If you look at the source code for the home page (right click, “view source”), and then search for the following string “<h1″ (by doing ctrl-F), you will see that it appears twice. The first one is inside <div class=”site-branding” and the second is inside a <div class =“navigation-branding”
Thanks.July 22, 2020 at 10:22 am #1372479LeoStaffCustomer SupportJuly 22, 2020 at 10:26 am #1372486Andrew
Ah ok, thanks for your help. It was giving me an error in ahrefs site audit but I guess it’s nothing to worry about?July 22, 2020 at 10:29 am #1372491LeoStaffCustomer SupportJuly 22, 2020 at 10:43 am #1372516Andrew
Ok thanks Leo. Can we leave this open until we get feedback from the rest of the team?July 22, 2020 at 2:17 pm #1372687TomLead DeveloperLead Developer
This is a tough one, as there is a desktop header and a mobile header. We *could* remove the H1 from the mobile header, but that means mobile devices won’t have an H1 on the page.
Since the headers never appear at the same time, I think it’s a non-issue. Even Google says that multiple H1 elements per page isn’t an issue:
https://webmasters.stackexchange.com/questions/65452/is-it-acceptable-to-repeat-the-same-h1-tag-for-desktop-and-mobile-browsers-in-aJuly 23, 2020 at 8:50 am #1373696Andrew
Thanks for the reply. I think we can close this. 🙂
Cheers.July 23, 2020 at 2:46 pm #1374050TomLead DeveloperLead DeveloperAugust 28, 2020 at 5:26 pm #1422426Mohamed
I faced some issue and I think it’s easy to fix by using this method
(wp_is_mobile()) ? $showH1 : $hideH1 ;
But how to use it with generate_site_title_output ?August 29, 2020 at 8:38 am #1423095LeoStaffCustomer SupportAugust 29, 2020 at 8:55 am #1423122Mohamed
I did and the new question is here
https://generatepress.com/forums/topic/how-to-fix-multiple-h1-tags-on-my-homepage/August 29, 2020 at 9:14 am #1423144
- You must be logged in to reply to this topic.