Created
November 22, 2017 13:44
-
-
Save nschaeferhoff/d2f48f88311aadc03a06d872befa2c15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function display_last_updated_date() { | |
$u_time = get_the_time('U'); | |
$u_modified_time = get_the_modified_time('U'); | |
if ($u_modified_time >= $u_time + 86400) { | |
$updated_date = get_the_modified_time('F jS, Y'); | |
echo '<div class="last-updated">This post was last updated on ' , $updated_date , '.</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment