Wordpress SEO Optimisation

I’ve recently being looking at the Google Page Rank of one of my sites.

A Taste of Garlic is a blog review site where I review, on a daily basis, blogs by people who have moved to France. It gets between 1,200 and 1,600 visitors a day but remains with a Google Page Rank of 3, the same it had when it was only getting half that number of unique visits.

I was reading around the subject and noticed that many SEO advisors suggested that it was vitally important that the <title>Title</title> change for every post/page.

That caused me some concern!

Here’s why….

A few months ago I did some work to speed up A Taste of Garlic – I wrote about it here – Six ways to speed up Wordpress.




One of the things I did was to rewrite the code in the header file (Header.php) that produces the Title.

Originally it was like this….
<title><?php bloginfo(‘name’); ?> <?php wp_title(); ?></title>

and I changed it to…

<title>A Taste of Garlic</title>

Well, that saved a php/mySQL lookup – surely that’s a good thing?

Maybe, but it also meant that every page/post would have a title tag of A Taste of Garlic – not so good!

I quickly opened up header.php and changed the offending line to the following…

<title><?php the_title(); ?> – A Taste of Garlic – Life & Living in France Blogs – <?php $category = get_the_category(); echo $category[0]->cat_name;?></title>

which gives this as a title (for a typical post)…

<title>Baguettes and Roses – A Taste of Garlic – Life & Living in France Blogs – Poitou-Charentes</title>

That’s more like it.

Now I know that Google only displays the first 65 characters of the title (as compare to Yahoo who display 120 characters) but there seems no clear understanding if they index more than 65 characters of the title tag.  I think that I’ve now got a title tag with relevant keywords that is still humanly readable and, more importantly, helpful to the casual visitor.

Whilst I was at it, I edited index.php and single.php and changed this….

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></a></h2>
<div class=”entry”>
<?php the_content(“Read more about… ” . get_the_title(”, ”, false)); ?>
</div>

to this…


<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h1><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Link to <?php the_title(); ?> – Life in France blogs all about living in France as an expat – <?php $category = get_the_category(); echo $category[0]->cat_name;?>”><?php the_title(); ?>
<?php $category = get_the_category();
If ($category[0]->cat_name==”General”){}
Elseif ($category[0]->cat_name==”Blogiversary”){}
Elseif ($category[0]->cat_name==”That was the week….”){}
Elseif ($category[0]->cat_name==”French Links”){}
Elseif ($category[0]->cat_name==”Hints and Tips”){}
Elseif ($category[0]->cat_name==”Recipes from France”){}
Elseif ($category[0]->cat_name==”Saturday Sites”){}
Elseif ($category[0]->cat_name==”UK Shopping in France”){}
else{echo ” – ” . $category[0]->cat_name;}?>
</a></h1>
<div class=”entry”>
<?php the_content(“Read more about… ” . get_the_title(”, ”, false)); ?>
</div>

This might not be the prettiest php code in the world but it does the job for the moment.

Basically, the post title gets changed from a <h2> tag to a <h1> tag.  I adjusted the display sizes of both tags so that they looked right on screen.

The post title now also gets followed by the category name (almost always the Region of France that the blog I’m reviewing is based in) unless it’s one of a select few categories that wouldn’t make sense to display.

Whether this will make any difference to my page rank for A Taste of Garlic I have absolutely no idea – but it certainly can’t hurt.

Now I need to do something similar with my other blogs….

And sort out that horrible php code!

All the best

If you liked this article, why not share it with your friends on Facebook

Reddit Digg Stumble Bookmark

Leave a Reply