Add Meta Description and Keyword in WordPress

Meta keyword and description is very impotent for SEO (search engine optimization) But, by default wordpress have no option to add meta description & keyword in post. To add keyword and description you can use SEO plug-in But, I think adding more plug-in make your site slower. To avoid this problem you can add some feature in your theme. First you have to create two custom fields named ‘metades’ and ‘metakey’. Custom fields creating option is given just below WP post editor. Then add below code in ‘header.php’ file which is located in theme’s directory.

Open ‘header.php’ in the head section
before </head> tag add
<meta name="description" content="<?php echo get_post_meta($post->ID, "metades", true); ?>"  />
<meta name="keywords" content="<?php echo get_post_meta($post->ID, "metakey", true); ?>" />

save the file.
now insert keywords separated by comma and space in value field of ‘metakey’ and description in ‘metades’ of a post. Value given in ‘metades’ and ‘metakey’ for a post will work as meta description and keyword of that post.

  • Sayma

    hmm.. darun darun chaliye jao… i am not programmer… so dont understand the codes…
    he he :D

  • SEO in Panama

    You can depend me in for a Digg. Thanks for posting this on your web site!