SEOnoob
   Random Post » Primer: Wordpress SEO

Page Title

Earlier on, we talked about optimising the permalinks, and now we'll talk about the page title of your Wordpress blog:


2. Page Title

By default, Wordpress sets your page title to be like this:

"BlogName » Blog Archive » Post Title"


What we want to do is to swap the position of "Post Title" with "Blog Name". This is because:
  • Search engines uses your Page Title as the linking text in its search engine results page (SERP).
  • The search keywords are bolded for page titles in search engines
  • It makes it easier for search engine users to know right away if what they are looking for is correct

Now, this will involve some editing to your template files, which is normally called "header.php". Find this:

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

and replace with:

<title><?php wp_title(' '); ?><?php if(wp_title(' ', false)) { echo '–'; } ?><?php bloginfo('name'); ?></title>

And you're done!

Continue to "3. Sitemap"

Related Posts:


13 Responses to “Page Title”

  1. Permalinks--SEOnoob
    May 14th, 2006 23:27
    1

    […] Continue to "2. Page Title" […]

  2. Google Sitemaps--SEOnoob
    May 14th, 2006 23:28
    2

    […] We have so far covered Permalinks and Page Titles, so now I would like to introduce a plugin called Google Sitemap Generator. […]

  3. Wordpress SEO: First Steps--SEOnoob
    May 15th, 2006 03:31
    3

    […] 1. Permalinks - changing your Wordpress permalinks to be search-engine friendly 2. Page Title - improve the readability of your blog posts 3. Google Sitemaps - creating a sitemap for your blog 4. Tagging & Meta Keywords - implementing tags on your blog and how to use them as meta keywords. […]

  4. Mike
    June 6th, 2006 12:11
    4

    I've tried this and its not working. Do I add or change anything to this line…

  5. teckie
    June 6th, 2006 15:58
    5

    ok, try copy and pasting the code again 'cos wordpress displays the quotation marks with fancy characters, I've made some changes so it should be fine now!

    cheers.

  6. Mike
    June 7th, 2006 06:38
    6

    Excellent. Thanks!

  7. Modify Title Wordpress at sonufifu
    June 28th, 2006 09:15
    7

    […] http://seo.blorc.com/seo/page-title/ Filed under: wordpress   |   […]

  8. modified header.php for better page title
    September 11th, 2006 10:13
    8

    […] http://seo.blorc.com/seo/page-title/ Bookmark to:          […]

  9. marinko
    October 10th, 2006 20:59
    9

    Hi.
    I have problem with page title.
    When I enter in header.php this

    I get ? mark before >> in page title. Here is how it looks
    Action?» mangiaphoto
    How I can remove ? mark

  10. teckie
    October 10th, 2006 21:30
    10

    i guess it's the echo '-' part you're talking about, replace the - with anything you want e.g. »

  11. marinko
    October 10th, 2006 21:36
    11

    thanks
    this solved my problem.

  12. Joe
    October 19th, 2006 01:21
    12

    Hey,

    I think there's a slight problem with this. Using this approach it inserts spaces before the title tag. I've tried prefacing it with 'trim' but it doesn't seem to strip it out either so I'm kinda stumped.

    Further info and alternatives are at: http://wordpress.org/support/topic/63186?replies=12

    Cheers,

    Joe

  13. Diesis
    July 16th, 2007 00:29
    13

    If you use wordpress 2.2.x, try All In One SEO PAck from uberdose (http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/), it will do the trick without editing any file.

Leave a Reply