While this blog will probably not get to caught up in covering search engine optimization, there are definitely a few tweaks that you can make to your existing WordPress theme that will help optimize your blog. In this post I’m going to cover a quick adjustment that you can make to your title tag to show a more optimal title.
By default, your WordPress theme will likely come with a pretty standard code for your blog’s title. It probably looks something like the following:
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
Unfortunately this is not the best way to code your title for your WordPress. Ideally, you’ll want a more search engine friendly way to display a custom title for each page of your WordPress blog. In order to achieve this, here is the code I recommend using:
<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>
This code will actually display a custom title for each different type of page on your blog automatically.
If you’re truly ambitious, you can actually use a plugin that will do all the dirty work for you. That plugin is called All-In-One SEO Pack, and it will help automate the process for displaying completely custom meta tags for each page of your blog, including the title field.


















Real useful tip!!
Good tip. I’ve actually been using the all in one seo plugin for quite some time and it’s great.
Most handy tip, just what I was looking for.
I tweaked it a tiny bit to use a » instead of the dash and had a little problem – I had copied and pasted the code above into Notepad and instead of the single quote characters (‘ ‘), it pasted little 6 and 9’s. I had to replace these with the single quotes and it works fine.
Thanks again,
Alex.
all in seo pack more useful for beginners. but this is nice article also.
Hi, nice post.
In order to avoid duplicate content, I try to include pagination number on title. What is the codex on WP 2.6 and higher? I use “?php echo $paged; ?” but the first page always shows “0″. In WP 2.3 it works. Please help. thanks