Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic Wordpress Shortcode registry and callback function.
<?php
function last_updated_code() {
return "<p>This post was last edited on ".get_the_modified_date()." by ".get_the_modified_author()."</p>";
}
add_shortcode( 'lastupdated', 'last_updated_code' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment