/ Published in: PHP
URL: http://wphacks.com/how-to-show-last-modified-wordpress-post/
If you run a blog where posts are regularly updated, you may want to consider updating your post meta data to also reflect the last modified date when applicable, rather than showing just the original posting date.
Expand |
Embed | Plain Text
Look for the code that displays the post date. It should look something like the following: Posted on: <?php the_time('l, F jS, Y') ?> Now replace it with the following code (slightly modified from Ardamis’ post): Posted on <?php the_time('F jS, Y') ?> <?php $u_time = get_the_time('U'); $u_modified_time = get_the_modified_time('U'); if ($u_modified_time != $u_time) { echo "and last modified on "; the_modified_time('F jS, Y');
You need to login to post a comment.
