- This topic has 16 replies, 2 voices, and was last updated 5 months, 2 weeks ago by
David.
-
AuthorPosts
-
December 8, 2015 at 12:36 am #158695
Sven
i’ve installed gp premium and i’m very very happy with your theme. now i analyzed my homepage with one of these seo tools and it seems i’ve no single h1 tag. some people say that’s really bad for a good google search experience. i’m not an expert but i think the title of my Homepage should be the h1 tag or i’m false!?
December 8, 2015 at 1:01 am #158699meleager
I would like to know that either.
December 8, 2015 at 7:32 am #158759Sven
I’ve found the solution right here in the forum…
https://generatepress.com/forums/topic/h1-as-page-title/page/2/#post-145765
The look and feel of my header area is exactly the same as before. The Difference is that the site title is now h1-tagged (only on the start page).
i’m a little bit suprised that this isn’t the default behaviour??
December 8, 2015 at 7:46 am #158761meleager
Thanks for the link, I will check the issue later and will write back if I have something useful to add.
December 8, 2015 at 9:45 am #158783Tom
Lead DeveloperLead DeveloperHi Sven,
Great find!
I would make it default behavior, but it might cause a change in the way some people are using their headers on updates. I try to make it so the updates don’t change anything drastic.
Also, not everyone uses a site title in their header – some use a logo or header.
For people using a logo or header, they can do something like this:
add_action( 'generate_before_main_content', 'generate_add_blog_title' ); function generate_add_blog_title() { if ( ! is_home() ) return; ?> <header class="page-header"> <h1 class="entry-title" itemprop="headline">My Blog Title</h1> </header> <?php }
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 15, 2018 at 4:20 am #648987Ranjit Kumar
thanks for sharing this!! One question… will it help me in seo for better rankings if implemented H1 in homepage. or it has some negative impact.
August 15, 2018 at 9:27 am #649435Tom
Lead DeveloperLead DeveloperHaving an H1 on every page will help your rankings 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 17, 2018 at 12:57 am #651485Ranjit Kumar
One last question tom I know this is off topic but plz help regarding this
In my category pages I have included a short description but when I am going to the second page of the category it’s showing the same description at the top( means in every page of that category it’s showing the same description) now will have I have to set the canonical to the first page.
example:
https://www.allchickenrecipes.com/chicken-recipes/chicken-breast-recipes/ –
see the descriptionhttps://www.allchickenrecipes.com/chicken-recipes/chicken-breast-recipes/page/2/
the same description on the top and so on with the next pages
Plz help regarding this tom
August 17, 2018 at 8:38 am #651940Tom
Lead DeveloperLead DeveloperGive this function a shot:
add_action( 'wp', function() { if ( is_paged() ) { remove_action( 'generate_archive_title', 'generate_archive_title' ); } } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 18, 2018 at 2:55 am #652496Ranjit Kumar
That worked! thanks tom
But one last question! i have set the h1 title on my homepage as the function given above and it’s workinng absolutely fine no problem on that (see my website) but again the same question, when i move to the next page it’s showing that h1 tile again (every page of homepages)
Question 1: Will it cause any duplicate conent with same heading on every page
Question 2: Or, what if i use the infinite scroll, so that it will be in single pageplz answer two questions in detail
August 18, 2018 at 10:29 am #652877Tom
Lead DeveloperLead DeveloperYou can tweak your full function to this:
add_action( 'generate_before_main_content', 'tu_add_blog_title' ); function tu_add_blog_title() { if ( ! is_home() ) return; ?> <header class="page-header"> <h1 class="entry-title" itemprop="headline">My Blog Title</h1> </header> <?php } add_action( 'wp', function() { if ( is_paged() ) { remove_action( 'generate_archive_title', 'generate_archive_title' ); remove_action( 'generate_before_main_content', 'tu_add_blog_title' ); } } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 18, 2018 at 10:51 am #652903Ranjit Kumar
Thanks tom! And what about if i use the infinite scroll option..then there will be no second page available. Will it help me in seo?
Waiting for your reply
August 18, 2018 at 7:01 pm #653135Tom
Lead DeveloperLead DeveloperInfinite scroll doesn’t have any effect on SEO, and the second page still technically exists for robots. The infinite scroll functionality is for humans only.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 19, 2018 at 12:30 am #653237Ranjit Kumar
Ok, thanks!! Now I have to invite you to my house and have lunch together
Btw just loving your theme Tom
August 19, 2018 at 8:48 am #653577Tom
Lead DeveloperLead DeveloperNo problem! Thank you! Great to hear 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.