Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I've noticed that the theme sets both the site name and the page title as H1, which could end up being a problem for seo purposes.
It would be nice if on the front page the site name was H1 and subsequent titles were H2 and throughout the site the site name was not classed as a header and the page title became H1.
I'm not sure how possible this is, but it would certainly improve things for search engine purposes.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#3 | lightfantastic-6.x-1.0-beta2-265137-2.patch | 3.69 KB | paulnem |
Comments
Comment #1
jbrauer CreditAttribution: jbrauer commentedChanged page title to use H2 consistently throughout the site and this is committed to -dev. Still need to look into some other ideas on the best way to handle the right combination of H1/H2.
Comment #2
paulnem CreditAttribution: paulnem commentedIt may be worthwhile to do an if/else statement around the site title and the node title. if $is_front etc
So the site title would be H1 on the front page, and just a regular p class on other pages, and node title would be a regular p class on the front page and H1 on all others.
It's a bit late now, but I'll see if I can put something together tomorrow morning.
Comment #3
paulnem CreditAttribution: paulnem commentedI've applied this patch to my install and seems to be working fine, it just adds a couple of if statements to the page.tpl.php to see whether we're on the front page or not, if we're on the front page then site_title is h1 and title isn't, if we're not on the front page then title is h1 and site_title isn't.
First time patch so sorry if it's not as expected.
Comment #4
jbrauer CreditAttribution: jbrauer commentedThanks. A similar commit applied to the -dev branch. It uses H2 for other headings instead of
tags since they generally are headings.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.