Optimal Title by Aaron Schaefer is a WordPress plugin that changes the title of your Wordpress blog posts to show the title of the post or page first. By default, a WordPress blog will show the blog title before the post title, Optimal Title switches that around for better search engine optimization.
The post or page title appearing first will return more relevant information for the search engines and display results from a search, in turn giving your page a higher probability of targeted traffic.
Installing the Optimal Title plugin is a little different than most plugins and requires a few extra steps. Aaron Schaefer wrote the instructions on his site and can be found at: http://elasticdog.com/2004/09/optimal-title/. However for those who are not familiar with, or comfortable working with WordPress template code, this will walk you through the few extra steps of configuring this excellent WordPress plugin.
Installation
1. Download here Optimal Title
3. Unzip, and upload the file called optimal-title.php to your wp-content/plugins/ directory.
3. Activate the plugin on your WP Admin » Plugin Management page by clicking the corresponding “Activate” link under the Action column.
*Update Note* The additional instructions below will explain how to change or download a text file as a php file, these are based on Aaron’s original instructions and are only applicable if you download the Optimal Title plugin as a text (.txt) file. These steps are outlined in the video but are not necessary if you download the zip file that should already have the correct .php file extension.
Change the extension of the downloaded file from .txt to .php (if you can’t change the extension before you upload it simply upload the .txt file and then login to your web host’s file manager and change the extension there).
Another, and easier option is to right click the download link and chose “Save link as”, or “Save as”, then in the “Save as type” drop down box choose “All Files”. Then in the “file name” box add the .php extension and save the file as a .php file.
Changing your WordPress blog templates file permissions
After you upload the Optimal Title WordPress Plugin you will need to add some code to your header.php template. In order to do this you must change the file permissions (CHMOD) of the header.php file in your web hosting accounts file manager.
In your web hosting accounts file manager browse to the location where your main Wordpress files are installed, then go to /wp-content /themes and open the folder of the current theme you are using. Find the header.php file and change the file permission to 777.
Now you are ready to add the code to make the Optimal Title WordPress Plugin work its magic.
Usage
Warning! Before making any changes to your Wordpress templates, copy the entire contents of the file to notepad or another text editor and save an unedited copy of the file on your computers hard drive. If things go bad simply paste the unedited code back. Don’t say I didn’t warn you!
In your header.php file replace the function call wp_title() with a call to optimal_title(). You’ll also want to position your blog name after your usage of Optimal Title in order for this to work as intended. You should end up with a line that looks something like this:
New code to place in header.php file
<title><?php optimal_title(); ?> <?php bloginfo('name'); ?></title>
I suggest as Aaron does, to use the more complicated version below all you need to do is look for the code in your header.php template that looks something like this:
Sample of original title code in header.php file
<title><?php bloginfo(’name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
And replace it with either line of code. All you are doing is replacing the code between the title tags <title> new code here </title>
For a more complicated version that checks to make sure the plugin is installed and also includes support for a tagline on the home page, this is actual code I use on this site:
Suggested code to place in header.php file
<title><?php if ( function_exists('optimal_title') ) { optimal_title('|'); bloginfo('name'); } else { bloginfo('name'); wp_title('|'); } ?><?php if ( is_home() ) { ?> | <?php bloginfo('description'); } ?></title>
*Special Note – Since the header.php file is specific to each theme, you will need to replace the code in each themes header.php file if you change themes.
Parameters
Optimal Title uses the same syntax as wp_title, from the default WP installation, and thus functions in the exact same way…
<?php optimal_title(’separator’, display); ?>
* ’separator’ – string – The text to place between portions of the page title, such as the blog name and the category. Defaults to ‘»’.
* display – boolean – Should the title be displayed (TRUE) or returned for use in PHP (FALSE). Defaults to TRUE.
Special thaks to Aaron Schaefer for this great Wordpress plugin, Visit his blog the ElasticDog
Technorati Tags: Wordpress blog, WordPress plugin, WordPress blog, WordPress Plugin
Tags: WordPress Blog, WordPress Plugin, WordPress Videos







