Posted By

goatboy91587 on 01/23/12


Tagged

wordpress


Versions (?)

Add Meta Description Tags to Archive Pages in WordPress


 / Published in: PHP
 

URL: http://www.brettwidmann.com/2012/01/add-meta-description-to-archives-wordpress/

The php if statement below checks to see if the content is an archive page. If it is, then it echoes the html structure for meta description tags and also includes the month and year to avoid content duplication.

  1. <?php if (is_month()) {echo '<meta name="description" content="'; the_time('F, Y'); echo ' archive page for Electric Mohawk."/>';}?>

Report this snippet  

You need to login to post a comment.