Tutorial : How to optimize your title tag
While not many people pay as much attention to this as they should, I’ve been really keen on optimizing my post, category, archives and front-page titles. Why ? It’s good for SEO, and not only. I’ve developed sites over the past 3 years, and usually most of my traffic came from Search Engines. Why ? Because I paid attention to all the details, and tried to optimize my blog as best as I could for SE.
One of the things I paid special attention, was the the title tag of my blogs. Usually, the title of your blog looks something like :
<title><?php wp_title(' '); ?> <?php if(wp_title(' ', false)) { echo ' : '; } ?><?php bloginfo('name'); ?></title>
Unfortunately, this is not the best way to code your titles, in an ideal situation you’d want a more search engine friendly way to display your title. To achieve this, you’d ultimately want to use the following code bellow :
<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() ) { single_post_title();}
else { wp_title('',true); } ?></title>
For a more into depth optimization of your title tag, I suggest visiting this link : Ardamis, title tag optimization.
If you have any thoughts or ideas, please share them below.
If it's your first time here, you might want to