Support » Fixing WordPress » How to show “Page last updated” in site?

  • Hi,
    I am trying to show my users what time and/or date the site was last updated/edited.

    Is there a php code or plugin for that?

    I found this code:

    $last_modified = filemtime("example7.php3");
    print("Last Modified ");
    print(date("m/j/y h:i", $last_modified));

    Does this do my job?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Joni


    It’s going to be last modified basically as of the date of your last blog post. The content is what people care about when they want to know how “fresh” your site data is and most people know how to use an RSS feed.

    what are you trying to say joni? use the following, it will work.

    <?php $u_time = get_the_time('U');
    $u_modified_time = get_the_modified_time('U');
    if ($u_modified_time >= $u_time + 86400) {
    echo "and last modified on ";
    the_modified_time('F jS, Y');
    echo " at ";
    echo ", "; } ?>


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to show “Page last updated” in site?’ is closed to new replies.