Return to Snippet

Revision: 55034
at January 23, 2012 14:50 by goatboy91587


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

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

Initial Description
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.

Initial Title
Add Meta Description Tags to Archive Pages in WordPress

Initial Tags
wordpress

Initial Language
PHP