A different Meta Description and Keywords for each post for WordPress
I once attended an SEO Workshop by the Singapore SEO Expert, and the trainer related to me that it is important to have a different meta description and meta keywords tag for each page of a website you are building.
Since I was working primarily on blogs, I was kind of disappointed because I thought blogs all use the same template, and most of them provided for only a different post title and content for each different post.
I particularly love working with WordPress (I’m a control freak when it comes to websites!) and I was investigating this issue further yesterday in the WordPress Codex, and I found a solution - and one that does not even require an extra plug-in! Custom Fields!
How do you get started?
First, you have to add some custom fields to your post. This is done when you are composing your post in the admin panel. There is a section under the main post called custom fields. Use that section to add the two meta tags in - description and keywords. And don’t limit yourself to description and keywords - you could have anything else! Author description, What I am doing, Weather, Mood etc.

Next, you have to edit your WordPress blog template.
In the template’s single.php file, add these two lines inside your HTML head.
<meta name="Description"
content="<?php echo(get_post_meta($post->ID, "Description", true)); ?>">
<meta name="Keywords"
content="<?php echo(get_post_meta($post->ID, "Keywords", true)); ?>">
Then, you are done! The get_post_meta() function retrieves the custom fields according to what you keyed in.
For more information on the WordPress meta functions and custom fields, check out Using Custom Fields in the WordPress Codex.
If you enjoyed this post, Sign up for the free Blog Marketing eCourse.
Tan Kian Ann is blog marketer based in Singapore. He now works with individuals and small businesses reach out to the world using blogs. 


February 15th, 2007 at 2:24 am
Visit Rupesh
Hi,
Is it possible on blogspot too?
February 15th, 2007 at 12:01 pm
Visit Kian Ann
Hi Rupesh,
Unfortunately, I don’t think this feature is available on blogspot - blogger blogs use only one template, and there are no custom fields.
February 15th, 2007 at 6:55 pm
Visit Rupesh
Check out http://labnol.blogspot.com for the main site and an individual page. But, I am sure he will not share this SEO secret.
February 15th, 2007 at 9:45 pm
Visit Kian Ann
Hey Rupesh,
That can be done in blogger - he put his blog post title (combined with his own set of static keywords for the whole blog) in his meta keywords!
March 15th, 2007 at 10:24 am
Visit Desktop blog editors? Why not use WordPress?
[...] While most of them work really fine as powerful desktop blog editors, I somehow prefer using the native WordPress admin console, partly because of familiarity, and also, I wanted the functionality of my WordPress Plug-ins like Ultimate Tag Warrior, I wanted to define the custom fields for my meta description and meta keywords. [...]
September 7th, 2007 at 12:55 pm
Visit SEO Blogging « TopSearchRanking
[...] 2. Description meta tag: You can use unique meta tag description for each of your posts. Read this post by Blogopreneur on how to have “A different Meta Description and Keywords for each post for WordPress“. [...]
October 24th, 2007 at 3:30 pm
Visit Reoptimizing Blogopreneur - Blogopreneur.com
[...] gave in and used the All in one SEO plugin. Previously, I was using post fields to do this, and I realise that I sometimes forget to key in the description and keywords because [...]
May 24th, 2008 at 12:44 am
Visit manish
i have put this code on my site but this is not working fine some time keywords comes but description is not coming can u tell me in detail m i wrong some where
June 11th, 2008 at 2:46 am
Visit Sappie
How does or will this compromise with my index page’s title, keywords, description? Thank you
June 11th, 2008 at 2:48 am
Visit Sappie
I’m sorry to forget to mention that the original php file does not include the description and keywords and so I have added them manually in the header.php using the standard html code.
September 29th, 2008 at 12:43 am
Visit tutorial web design
fantastic. Its worling fine in http://www.tutorialwebdesign.com. Now I can easly describe different keywords and description for each post.
thanks
http://www.tutorialwebdesign.com
an online magazine to web design
September 29th, 2008 at 3:11 pm
Visit tutorial web design
I did this..
description is coming..but keywords are not coming..
plz suggest what to do.
http://tutorialwebdesign.com/2008/09/7-benefits-of-social-bookmarking/
thanks
http://www.tutorialwebdesign.com