WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Optimal Title

Optimal Title mirrors the function of wp_title() exactly, but moves the position of the 'separator' to after the title rather than before.

What options can be passed to optimal_title()?

Optimal Title functions in the exact same way as wp_title(), and thus you may specify the following options:

<?php optimal_title('separator', display); ?>
  • separator - (string) Text to display between portions of the title (i.e. the separator), such as the archive elements of year and month. Defaults to '&raquo;' (»).
  • display - (boolean) Display the page title (TRUE), or return it for use in PHP (FALSE). Defaults to TRUE.

What specifically needs to be changed in the header.php file?

The most simple answer is to remove everything between the HTML <title></title> tags and then put the following code in its place:

<?php optimal_title(); ?> <?php bloginfo('name'); ?>

If you want a slightly safer version that won't break if you do not have the plugin activated or installed, then try something like this in between the HTML <title></title> tags:

<?php
if ( function_exists('optimal_title') ) {
    optimal_title(); bloginfo('name');
} else {
    bloginfo('name'); wp_title(); }
?>
<?php if ( is_home() ) { ?> | <?php bloginfo('description'); } ?>

Requires: 1.2 or higher
Compatible up to: 2.3.3
Last Updated: 2007-4-12
Downloads: 45,212

Ratings

4 stars
4.5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1