Skip to content

Instantly share code, notes, and snippets.

@paaljoachim
Last active August 29, 2015 14:27
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 paaljoachim/c032daad49b1c3c41252 to your computer and use it in GitHub Desktop.
Save paaljoachim/c032daad49b1c3c41252 to your computer and use it in GitHub Desktop.
Sometimes I will update a post and the following code snippets adds below the original date a message that says updated then the date I updated the post.
//* The following code was taken from: https://dl.dropboxusercontent.com/u/2503558/GenesisWP/code-snippets.html
//* and works only for child themes using the Genesis framework.
//*
//* Add last updated date to the post info in entry header
add_filter( 'genesis_post_info', 'sk_post_info_filter' );
function sk_post_info_filter($post_info) {
if (get_the_modified_time() != get_the_time()) {
$post_info = $post_info . '<br/>Last updated on: ' . the_modified_date('F j, Y', '', '', false);
}
return $post_info;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment