Skip to content

Instantly share code, notes, and snippets.

@bearded-avenger
Last active December 22, 2015 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bearded-avenger/6540945 to your computer and use it in GitHub Desktop.
Save bearded-avenger/6540945 to your computer and use it in GitHub Desktop.
Last Updated Shortcode
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