SEO Tip: Give your WordPress blog a unique H1

By | August 29, 2010 at 9:00 am | One comment | Web Development | Tags: ,

I manage a few WordPress blogs as do most people involved in SEO, and I have run into a similar problem with all of them – the ability to specify a unique H1 on just the homepage whilst the blog & category titles are the H1’s throughout the rest of the blog.   The majority of WordPress blogs do not allow you to do this and replicate the Blog Title throughout the website.

There are several ways of changing your WordPress template to allow you to setup a unique H1 for your homepage.  By default, the majority of WordPress templates have the H1 setup as following:

In the case of my blog, I decided that I would change the WordPress template to show a snippet of text on only the homepage of my blog. To do this I replaced the H1 in the header.php file with a

tag, amended the CSS so the style was the same and then added the follow line of PHP text to the index.php file:

Custom H1

Custom intro text

Whilst this is acceptable for most blogs, I have encountered instances where I needed to leave the default H1 in its current position on the homepage (such as a replacement logo or strapline) and show it as a

tag on all other pages.

To achieve this, you can use the following lines of code in the header.php file:

//If the page is only the homepage with post snippets print out the Blog Name as an

//If the page is NOT the homepage, then print out the Blog Name as


In the instance above, I have set custom classes to replicate the styles so that to the end user the blog looks the same, but for the purposes of SEO I have created a unique H1 to increase relevancy on the homepage of the blog.

About the Author

Kev Strong

Kev Strong is an online marketing consultant at Newcastle Upon Tyne based digital marketing agency, Mediaworks. A lover of all things search and an ex-web developer, Kev Strong (a.k.a Goosh) is a specialist in advanced search engine optimisation.

One Comment

  1. Kopi (10 years ago)

    Is any plugins to get simple solution for this case ?

Comments → Kopi