How to Make your Title Tag SEO Friendly

Optimizing your blog for Search Engines is one of the major key factors we have in mind, when we start a Blog. When Optimizing a Blog, we need to take special care of Page Titles, Post Titles according to their value on the page. Search Engine ranks and rates the Heading depending on its tags and optimization. Here’s a simple yet cool code which can help you make your Title Tag SEO Friendly.

All you need to do is open Header.php file of your theme, find <title> tag and replace the following code.

1
2
3
4
5
6
7
8
9
10
11
12
13
<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 SEO optimized title tags according to the following model:

  • If the visitor is on the blog homepage: We’ll display the blog name.
  • If the visitor is on a category page: We’ll display the category name and the blog name.
  • If the visitor is on an article page: We’ll only display the article title.
  • If the visitor is on a static page: We’ll display the blog name, and the page title.

No need to follow this tutorial, if you are using Thesis theme. It does it my default ! ;)

We will be happy to hear your thoughts

Leave a reply

WP PANDA