- This topic has 13 replies, 4 voices, and was last updated 4 months, 3 weeks ago by
Leo.
-
AuthorPosts
-
July 22, 2020 at 9:00 am #1372384
Andrew
Hi
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 #1372426Leo
StaffCustomer SupportHi there,
I’m only seeing the site title as
<h1>
which is the default:
https://www.screencast.com/t/7YNxclrbBDjWhere are you seeing the second one?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 22, 2020 at 10:09 am #1372467Andrew
Hi Leo
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 #1372479Leo
StaffCustomer SupportThe
navigation-branding
one should only show on mobile in the mobile header.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 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 #1372491Leo
StaffCustomer SupportI’ll mention it to our team and see if it can be improved.
Thanks for pointing it out 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 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 #1372687Tom
Lead DeveloperLead DeveloperHi there,
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-aDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 23, 2020 at 8:50 am #1373696Andrew
Hi Tom
Thanks for the reply. I think we can close this. 🙂
Cheers.
July 23, 2020 at 2:46 pm #1374050Tom
Lead DeveloperLead DeveloperNo problem! 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 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 #1423095Leo
StaffCustomer SupportAny chance you can link me to the page in question so I can see your current setup?
Feel free to open a new topic so you can use the private URL field.
Let me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 29, 2020 at 8:55 am #1423122Mohamed
Thanks Leo,
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 #1423144Leo
StaffCustomer SupportThanks!
We will take a look.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.