Last active
August 29, 2015 14:27
-
-
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.
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
//* 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