Add inline HTML to posts published within last 24hrs

Compare the current time with the UNIX time stamp of the post date:

// now minus one day in seconds
if ( ( time() - 86400 ) < get_the_date( 'U' ) )
{
    echo '<span class="new">New!</span>';
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)