Last active
December 22, 2015 22:38
-
-
Save bearded-avenger/6540945 to your computer and use it in GitHub Desktop.
Last Updated Shortcode
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
add_shortcode('last_updated','53fh26_lastupdated'); | |
function 53fh26_lastupdated($atts,$content = null){ | |
$updated = get_the_modified_date('F j, Y'); | |
$out = sprintf('<p class="last-updated">Last Updated: %s</p>',$updated); | |
return $out; | |
} | |
// Usage | |
[last_updated] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment