voodish logo
tweet rss book of faces Linked In

Wordpress last edited time code script

Display the last edited date and time in Wordpress. To show your users when the last time you updated your Wordpress article was, simply enter the following code where you would like the time code to be displayed.


Key to values
F represents the Month (word)
d represents the Day (numerical)
Y represents the Year (numerical)

<?php the_modified_time('F') ?>,
<?php the_modified_time('d'); ?>
<?php the_modified_time('Y'); ?>

You can see this code working at the bottom of this post.

Non Wordpress sites

You can use the following code to display the last edited date and time on a none wordpress but php driven site.

<?php date_default_timezone_set("EST"); echo date ("Y-m-j h:i:s A (T)", getlastmod()); ?>

 

Related Articles

Comments RSS Feed

1 Comments

  1. newklear February 24, 2010

    thank you ,,

  2. Go to Top of the page

Leave a comment