This should do it.
// See if the post is older than 24 hours.
if ( get_post_time() <= strtotime( '-1 day' ) ) {
echo 'Published more than 24 hours ago.';
} else {
echo 'Published within the last 24 hours.';
}
This should do it.
// See if the post is older than 24 hours.
if ( get_post_time() <= strtotime( '-1 day' ) ) {
echo 'Published more than 24 hours ago.';
} else {
echo 'Published within the last 24 hours.';
}