Search, Snippets, WordPress

Search engine friendly WordPress titles

This blog’s title (have a look in the title bar ^) has been seo-ed to the max. Here’s what I put in header.php of my current theme.

<title>
    <?php wp_title($sep = '');?>
    <?php if (is_home()) { bloginfo('description'); } ?>
     - <?php bloginfo('name'); ?>
</title>

Robert thinks it’s cool! What about you?

[Edit]

Here’s yet better version from Robert.

<title>
    <?php if (is_home()) { bloginfo('description'); } ?>
    <?php if (is_search()) { _e('Search Results' . 
        ' for ' . get_query_var('s')); } ?>
    <?php wp_title($sep = '');?> - <?php bloginfo('name'); ?>
</title>

[tags]seo, wordpress, search engine optimisation, search engine friendly[/tags]

3 thoughts on “Search engine friendly WordPress titles

Comments are closed.

Career Guide for Software Developers