Tips on Webhosting, Blogging, Web Design, Webmastering, SEO, CSS, and whatever the damn hell I know.
I’ll be focusing on optimizing the page title for a WordPress blog. Along the way, I guess there’s useful info for optimising the page title of any website.
Maybe I’ll write a future post on general tips for optimizing a page title…
Anyway, this shows the importance of placing keywords in your page title.
This will give your site a good rank in search engines. I’ll use my fantasy + classical art blog as an example.

This page of The Galeon is for visitors who’d like their artwork to be featured on the art blog.
This is the current version of my page title.
The following screenshot shows a previously indexed version of the page, but still puts the point across.
When you type in “submit artwork blog” — The Galeon’s “Submit Artwork” page is #1. Yippee. I’m happy as long as it’s on the first page (but of course, #1 of the first page is very nice).

Try to place your most important keywords nearer to the left. The search engine tends to read the keywords in titles in order of importance that way.
This is why you should always put your blog/website name right behind (if you do include it), instead of the front, where your all-important unique keywords should be.
The damn page title and meta description gave me a big headache, as I *thought* I had done it correctly.
This is what I did at first. I simply added the page title that I wanted, and the meta description (what is below the page title, in search engine results) to header.php.

And this is what happened in Google –

The page title and meta were the same for every page. Not good, not good. You don’t want the same description appearing for all posts/pages.
Luckily, I managed to find How To Make Your WordPress Titles Search Engine Friendly, an article written by Garry Conn. The code he switched to is the best ever.
* HAVE A BACK-UP COPY of your original files before changing anything! *
Open header.php — look for the <title></title> section.
Example:

Replace that portion with this:
<title><?php if (is_home()) { ?><?php bloginfo(’name’); ?><?php } ?><?php if (is_single()) { ?><?php wp_title(''); ?><?php } ?><?php if (is_archive()) { ?><?php wp_title(''); ?> - <?php bloginfo(’name’); ?><?php } ?><?php if (is_page()) { ?><?php wp_title(''); ?> - <?php bloginfo(’name’); ?><?php } ?><?php if (is_search()) { ?><?php the_search_query(); ?> - <?php bloginfo(’name’); ?><?php } ?></title>
If you want to go insane pulling your hair out tweak it further, you can fiddle around, and see what you come up with.
The <title></title> attributes for The Galeon now look like this.

Basically, I fiddled around with all the sections.
My home page title is “Fantasy, Classic Art Blog - Drawings, Paintings, Poems » The Galeon” (try to keep it around 65 characters maximum. Any longer and it’ll get cut off in search engines, and look ugly).
Page title for a single post is “title of single post | Art Blog » The Galeon”.
<?php if (is_archive()) { ?> covers the page title for categories, tags, and archives (by month, year, etc).
This gives you better control over the page title, for your WP posts and pages.
The meta description is for you to add whatever content about your site, that you couldn’t fit into the page title. Page title contains keywords — you can use a sentence or two for the meta description.
For the meta description for The Galeon homepage, I downloaded Another WordPress Meta Plugin, after reading Implementing Custom Descriptions in WordPress. I didn’t want a meta description for every single post, so that plugin worked just fine for me.
10 Responses for "Optimize WordPress Page Title"
Awesome implementation. I think you really do “get it” and I wish I could say the same for many others. :)
This is probably one of the most important things you can do with your WordPress blog if you’re trying to capture the attention of users in search.
Best Regards,
Garry Conn
greetings, and much thanks. i would have really gone bonkers, if i hadn’t come across your post on this.
a year ago, i still had no idea what all these things were, and had to do a massive clean-up of the html for my dragon site. every single page title was “dragonsinn” — no more, no less. SHEESH!
now to wait for google to index the updated pages ^^
jess.
Wah! Pro!
yeah…it’s quite a bit of work! but it’s said that this is the 20% of work needed to get the 80% of results (traffic and etc).
anw, i might be MIA for a while…currently “gathering my thoughts” about my book, heh.
Alrite..
Thank you very very much for this post, it has helped me alot!! One small question though: when I use your code, I get this ” quotation sign in front of all my page titles, except the homepage. Could you enlighten me on how to get rid of that? Thank you very much!!
hello there,
oops, the
< ?php wp_title("); ?>part should be< ?php wp_title(''); ?>. as in you hit'and'twice (no space in between).i edited the code above. this time the ” quotation should be out. do let me know if it still appears.
hope that helps! :)
Aah, much better! :-) Thank you for your quick reply!!
Hi there..
I am new to blogging so please forgive me if I am being a dummy, I impleted the code change you posted regarding SEO for page titles etc.. the trouble is nothing changed and the pages still only showed numbers.. I then checked on Gary Conns blog and used his code [ not sure if both your codes are the same ].. anyway again nothing changed.. I can’t understand what I have done wrong… I wonder if you could take a look and see for me? http://www.ReneDwight.com many many thanks..
Rene Dwight
hello, i think it’s to do with the permalinks — will e-mail (:
Leave a reply
Some HTML is allowed: ‹b›, ‹i›, ‹a›.