Hi friends, In this post i would like to explain about how to maintain dynamic meta description for a wordpress blog. No need to add any plugins to maintain meta description. Using this method, we can have meta description

how to add dynamic meta description for wordpress blog  | Anil Labs

how to add dynamic meta description for wordpress blog | Anil Labs

To add meta description to your blog with few steps.

Step 1:

Open header.php form your theme folder

Step 2:

Add below code in your file

1
2
3
4
5
6
7
8
 <meta name="description" content="
<?php if (have_posts()&& is_single()):
           while(have_posts()):the_post();
                the_excerpt_rss(20,2);
           endwhile;
      else: ?>Anil Labs , Web Programming Blog and maintained by Anil Kumar Panigrahi.This blog covers PHP , OSCommerce, CakePHP ,CodeIgniter, JavaScript, Smarty ,Drupal , Articles , facebook app, facebook pages and joomla .
     <?php endif; ?> "

 />

Step 3:

Save it and have a fun. Check the view source
From now we can get meta description dynamically for each and every post.


1 Comment

Santkumar Singh · January 25, 2012 at 6:28 pm

Thank you for your information .

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *