WordPress title suffix plugin

I read some research recently which seems to show that keywords matter to search engines in your site’s “title” tag. Not only that, but position matters. Preferably your page title should precede your site title.

Unfortunately WordPress is coded to make that sort of ugly. If you simply reverse the wp_title and wp_bloginfo(‘name’) calls, you get ugliness in two ways. If what you want is “keyword – sitename”, then you have to live with the default title for your site looking like “- sitename”. Ugly. Then if you are on a titled page, you get “» keyword – sitename”. I don’t know about you, but I think that’s ugly too.

So, enjoy my tiny little WordPress plugin. It will strip out the leading “»” and will not put the dash in unless there is something preceding it. I’m no PHP god, but that was both easy and fun, due to the “hook” system WordPress implements so nicely. You’ll still have to reorder your themes to have “wp_title” listed before the sitename, but at least it will look prettier now.

Download: wp-title-suffix.zip