Mika MAtikainen

Apr 15, 2020 · 4 min read

How can I display both the post date and the modified date on my WordPress posts?


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');
                echo ". ";
          }
?>        

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This