Optimizing the Title tags of your WordPress Theme

The title tags In your Blog Template Matters a lot from the SEO point Of View.Most WordPress Blog template are Not optimized regarding the Title tags.Implementing these Settings Would Definitely make your template Search Engine Friendly.

What is a Title tag ? What Importance Does it have ?

A title tag tells both users and search engines what the topic of a particular page is.Ideally, you should create a unique title for each page on your site.Titles for deeper pages on your site should accurately describe the focus of that particular page.The <title> tag is placed within the <head> tag of an Html Document.

The general setting : Most WordPress Blog templates Use the following Code between their Title tags.

<?php bloginfo(‘name’); ?><?php wp_title(); ?>

This setting is not optimized as All the pages in this Site will show a common title tag .For example : Consider a blog on Computers having the  title : Advanced PC tips and tricks.Now if you use the un-optimized code the

1.Category pages will show : Advanced Pc tips and tricks-category

2.Tag pages will show  : Advanced pc tips and tricks-Tag.

3.Archive Pages will show : Advanced pc tips and tricks-Archives.

4.Post pages will show : Advanced Pc tips and Tricks-post title.

The Blog title needs not be showed On all the pages.You are required to show only the Post / page title On the respective pages and Your Blogs title only on the Home page.

The optimized Setting for Title Tags

Now open the header.php file for editing and replace whatever is between <title> & </title> tag with the following code:-

<?php if (is_home () ) { bloginfo(‘name’); } elseif ( is_category() ) { single_cat_title();  }
elseif (is_single() || is_page() ) { single_post_title(); } elseif (is_search() ) { echo ” Search results for : “;
echo wp_specialchars($s); } else { wp_title(”,true); } ?>

After you are done, You will see the following Changes :

  • The Category and tag pages will show only the category or tag Name in the Title.
  • The post pages will Show only The post title as the Title.
  • The Archive pages will Show only The Chosen Month / Year in the Title.
  • The Home page of your Blog Will Show the Blog title.

Now your Site will show More Accurate title tags for every page.


Please enter your comment!
Please enter your name here