Customized Title Optimization - Wordpress Plugin Alternative
If you're new here, you may want to Subscribe to my Updates or to my RSS feed. Thanks for visiting!
A typical title in the standard (Kubrick) Wordpress theme looks like:
Blogname » Title of Post
Unless you explicitely like to brand your blogname, that’s not a search engine friendly title.
I’d rather have the title of the post as my page title.
As an option, it could be followed by the blogname, so that branding still takes place, but personally I prefer not to include that.
There are Wordpress Plugins that will do the trick. And many are added frequently. If you prefer the plugin-route, just do a search on Wordpress Plugin Meta or visit Wordpress or Wordpress Plugin Database.
When I started blogging, these plugins weren’t available, so I created my own title optimization alternative.
And I still use it today. I’m very happy with it, because I’m in control and don’t need yet another pluging (have so many already).
Here’s how it works.
In the theme directory find the file called header.php.
In there, find this line:
<title><?php bloginfo(’name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
and replace that by:
<title><?php $title = wp_title( ”, false ); if (!$title) {bloginfo(’name’); } else {wp_title();} ?></title>
This line of code simply says, that if there isn’t a post title, it should display the blogname, otherwise the title.
Now, the standard Wordpress theme doesn’t include description and keyword Meta Tags.
We can easily add these right below the line we just pasted in:
<meta name=”description” content=”<?= bloginfo(’name’)?> presents <?php $title = wp_title( ”, false ); if ($title) {wp_title(); echo ” “;} ?>and other xxxx topics. ” />
<meta name=”keywords” content=”<?php $title = wp_title( ”, false ); if ($title) {wp_title(); echo “, “;} ?>xxxx” />
Replace xxxx by your main keyword. Upload header.php and your Meta Tags will exactly fit the title of your post.
Easy uh?
Unfortunately Wordpress inserts a » (right angled quote) before every title and I don’t like it. To delete that, you have to find the general-template.php file under wp-includes.
In that page, find function wp_title($sep = ‘»’, $display = true)
In that function, find these two lines:
if ( !empty($title) )
$prefix = ” $sep “;
and comment them like this:
// if ( !empty($title) )
// $prefix = ” $sep “;
Upload the file again and the right angle quote is gone.
Done, in less than 5 minutes!
Special Note: when upgrading your Wordpress version, don’t forget to save the Wordpress theme folder (and the general-template.php file under wp-includes) and upload it again after upgrading.
That’s how I customize my Wordpress titles and, on the fly, the description and keyword meta tags.
Your thoughts?
Related Articles:
- Traffic Generation and Link Building On Crack!
- How To Blog For Profits
- Internet Marketing Articles - Tutorials
- Powerful Alternative For Wordpress Adsense Plugins
- A Remarkable Wordpress Sticky Plugin Alternative
- Do You Have A Link To Your Home Page In Wordpress?
- Do You Make These Blogging Mistakes?
- How To Make Your Blog Sticky
- Blog Comments, Spammers, Backlinks and NoFollow
- Search Engine Optimization Wordpress Blogs
- Wordpress membership plugin
- Increase Blog Traffic: Wordpress Trackback Video




















August 5th, 2007 at 1:11 pm
I have no answer for this good use of brain but this …
Title Optimization
May 9th, 2008 at 7:34 am
The default Wordpress page title schema definitely needs to be changed right away.
There is a plugin called All-In-One SEO Pack that once installed allows you to easily change/configure the titles and meta tags of your pages.
Also, after you install it the default settings are to have the post names first in the title, followed by the pipe character, followed by your blog name.
If you dabble in keyword sniping or your blog name contains good keywords then this plugin will help you immensely.