
You know it: SEO is a very important part of your blog because without a good seo, you’re loosing lots of potential visitors. In this recipe, I’m going to show you how to optimise the <title> of your blog for a better SEO.

You know it: SEO is a very important part of your blog because without a good seo, you’re loosing lots of potential visitors. In this recipe, I’m going to show you how to optimise the <title> of your blog for a better SEO.
Open your header.php file for edition. find the <title> tag, and replace it by the following code:
<title>
<?php if (is_home () ) {
bloginfo('name');
} elseif ( is_category() ) {
single_cat_title(); echo ' - ' ; bloginfo('name');
} elseif (is_single() ) {
single_post_title();
} elseif (is_page() ) {
bloginfo('name'); echo ': '; single_post_title();
} else {
wp_title('',true);
} ?>
</title>
This code will generate title tags according to the following model:
The result of this recipe can be seen on WPRecipes as well as on my other blog Cats Who Code.
Leave a Comment