Show post modification time


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Posted on <?php the_time('F jS, Y') ?>
  2. <?php $u_time = get_the_time('U');
  3. $u_modified_time = get_the_modified_time('U');
  4. if ($u_modified_time != $u_time) {
  5. echo "and last modified on ";
  6. the_modified_time('F jS, Y');
  7. echo ". "; } ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.