This will let you detect if a post is 28 days old or younger and you can output whatever you like if it is!


$mylimit=28 * 86400;
 //days * seconds per day 
$post_age = date('U') - mysql2date('U', $post->post_date_gmt);
if ($post_age < $mylimit){
        echo "Whatever you would like here :)";
}

Leave a Reply