Skip to: Content | Navigation | Site map

Wordpress last edited time code script

  Posted: October, 31 2008

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

No Comments Yet

You can be the first to comment!

Leave a comment