Normally the site title in Genesis is a H1 tag, on the frontpage and all other pages, posts and archives. In my opinion, every page, post and archive ideally only has one H1 (namely its title), while it has in fact two: the site titel and the entry title. Since it is important to pertain the H1 entry title, this post explains how we can adjust the H1 tag of the site title.
Use the following snippet to replace the H1 title tag on all the pages except on the frontpage by a P (paragraph) tag.
Add this code to the functions.php of your theme:
What we have achieved with this small piece of code is:
- We have a single H1 per page, post or archive
- The frontpage has one H1, namely the site title
- On single pages the H1 is the page title
- On single posts the H1 is the post title
- In archives the H1 is the archive title
To keep the headings semantic and meaningful, use H2 t/m H6 in your content. Don’t skip or mix up your headings.
Thank you for this tutorial. It’s an elegant solution.
I am wondering if it is possible to remove the H1 option from the post/page editor?
Frank Schrijvers says
I don’t think so, This is a major part of your post, page slug and URL.