WordPress old post warning

<?php
// Put inside Post Loop

$time_defined_as_old = 60*60*24*365; // A Year

if((date(‘U’)-get_the_time(‘U’)) > $time_defined_as_old) {
echo ‘<div><strong>Notice</strong><br />This article is published more than one year ago.</div>’;
}

?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*