Performancing Metrics

Minor Title Tag Hack

I know this is minor but pixies.ca has a nice tip to make the title tag of your blog more search engine friendly. By default WordPress outputs the blog title when on the home page. Then blog name plus post title for individual entries. This small hack displays the blog name and blog description on the home page.

< ? bloginfo('name'); ?> < ? if ( is_home() ) { ?> &raquo; < ? bloginfo('description'); ?>< ? } ?> < ? if ( is_single() ) { ?> &raquo; Blog Archive < ? } ?> < ? wp_title(); ?>

Categories: WordPress Hacks



Comments

  1. André says: 3/5/2005

    I recommend Optimal Title Plugin

  2. John says: 3/5/2005

    What am I missing?

    To accomplish the same thing as this plugin do the following between the title tags. (Untested)

    <?php if ( is_home() ) { bloginfo(‘name’); ?>» <?php bloginfo(‘description’); } if ( is_single() ) { ?> <?php wp_title(); ?> » <? bloginfo(‘name’); } ?>

    Right?

  3. André says: 3/5/2005

    Yes looks good, the function is called optimal_title and at the end the description is being displayed