Arrow

Show nicer, reverse titles on your WordPress blog

First published on July 15, 2007

By default, WordPress titles (in the title bar of the browser) look something like this:

Title of your blog » Post title

To help people find your blog better (ew, is this a post about SEO?), the order should be reversed, so that your post title comes first. For example, if someone searches for “make your own family feud game” on Google, one of my posts shows up quite high in the rankings. But with the default title, the Google result shows “Peter’s Useful Crap” and then the post title “Make your own Family Feud Flash game”. I’m willing to bet that people care less about the title of the site offering the information than about the specific post.

There are plugins that let you customize optimal titles, but that’s not really necessary. To have a title such as:

Post title | Title of your blog

Use this code in your template’s Header page (header.php):

<title><?php wp_title('', TRUE); if (!is_home()) print ' &#124; '; ?><?php bloginfo('name'); ?></title>

(To edit your template files, visit “Template… Theme Editor” in your WordPress admin panel.)

Arrow

2 Responses to “Show nicer, reverse titles on your WordPress blog”


  1. Deena says:

    What’s a good way of tracking my hits etc? Right now I have no idea except for when you tell me how many telus monkey searches I get… thanks! : )


  2. George Latimer-Knight says:

    Thank you for giving this code. I know its simple, but I am not fimilar with PHP just yet. Peace.

Speak your mind

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word