Wordpress wp_title() search engine optimization tip

May 3rd, 2006 at 4:28PM EDT or 2 years, 3 months ago (mid-afternoon)

By default, Wordpress generates titles using the wp_title() tags. The titles for each post usually end up looking like “BLOG NAME >> POST NAME”. By changing it to “POST NAME at BLOG NAME” you could theoretically boost your search engine rankings for that post because now, rather than the unimportant blog title (at least less important than the post title) being first, the post title is now first.

1) First, open up the header.php file for your theme (if it’s a custom theme, it’s the file with the title tags at the top).

2) Find:

<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

(this is how it appears in the default template; it is just the line with the <title></title> tags)

3) Replace that line with:

<title><?php wp_title(''); ?><?php if ( is_home() ) { } else { ?> at <?php } ?><?php bloginfo('name'); ?></title>

That’s the way RV2 [blog] is currently formatted! Note that this does not affect the index page title in anyway, just the post page titles.

1 response to “Wordpress wp_title() search engine optimization tip” »

  1. Phase
    July 10, 2006 at 4:34 am

    This might be an old post, but I was looking around your site and discovered this tweak. Thanks for it, I’m using it now. :)

    - Phase


Comment RSS Feed TrackBack URI


Leave a comment

(required)

(required - not published)