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