Return to Snippet

Revision: 11067
at January 22, 2009 07:56 by davebowker


Initial Code
<?php $mylimit=31 * 86400; $post_age = date('U') - get_post_time('U'); if ($post_age < $mylimit) { ?><img class="new" src="<?php bloginfo('template_url'); ?>/images/new.png" alt="" border="0" /><?php } ?>

Initial URL


Initial Description
To be placed inside a loop or a query

Initial Title
Wordpress, if in the last X days

Initial Tags
php, date, wordpress

Initial Language
PHP