Feeds

wordpress header

PerformancingAds

 Optimal Title Tag Code For WordPress

Submitted by Ryan Caldwell on July 29, 2007 - 7:42pm in

HTML title tags are, arguably, the single most important SEO ranking factor. Nailing the title tag could be the most important thing you do all year in your blog's SEO campaign. Yet the average blogger simply inherits her WordPress theme's title tag, without shaping it into SEO perfection. In this article I'm giving you the code for what I think are the two most optimal WordPress title tags.

I've been using the "Cutline" title tag code for the longest time, assuming that it was the best out there (and in some cases, it very well may be). But the other day, I decided to question all my basic blogging assumptions and re-think some critical questions from scratch. Having done that, I've come up with the following SEO optimized title tag code to place in your header file:

<title><?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else bloginfo('name'); ?> </title>

This is optimized for SEO, not necessarily for usability. For example, if branding is important to you, you might prefer the Cutline title code, a version of which I include here:

<title><?php if (is_single() || is_page() || is_archive()) { ?><?php wp_title('',true); ?> | <?php } bloginfo('name'); ?> </title>

The main difference here is whether or not the name of your blog gets included in the title of every page. It is my view that by putting your blog title in the title tag of every post, you dilute the SEO value of your article's title.