Last Modified Timestamp


This plugin adds information to the admin interface about when each post/page was last modified (including custom post types!).

Enhanced areas:

  1. Page/post admin tables – added Last Modified column which is also sortable.
  2. Page/post edit screen (post.php) – added Last modified on: *timestamp* to Publish meta box.
  3. Admin messages after editing a page/post – ie: Post updated. *timestamp* View Post,

No options currently available, but the output can be fully customized with filters and the shortcode can be easily customized using attributes!


  • Page/post admin tables - added Last Modified column.
  • Page/post edit screen (post.php) - added Last modified on: *timestamp* to Publish meta box.
  • Admin messages after editing a page/post - ie: Post updated. *timestamp* View Post


  1. Upload the last-modified-timestamp folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.


Installation Instructions
  1. Upload the last-modified-timestamp folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
How to add the last modified time to my page or post?

This plugin does not change the public facing appearance of your website, but gives you a few ways to add this if you wish.

  1. Using the [last-modified] shortcode. See below.
  2. Using template functions in your theme or plugin. See below.
How to provide the last modified time to search engines?

The best way to provide the last modified timestamp to search engines is by using a plugin to add an XML sitemap for your website. This is a special kind of document which provides various information to search engines about all the content on your website, including when each was last modified. Many SEO plugins provide include this functionality with them, but there are many standalone plugins for this as well. This allows search engines to reference a single file (which is automatically kept up to date for you by the plugin) to know exactly what content has changed on your whole website since it was last indexed, rather than recrawling every page.

This plugin may be used to display the last modified date and time to a reader on your website, but it is not intended as a tool for SEO.

How to use the [last-modified] shortcode?

[last-modified] Returns the last modified timestamp in this format date seperator time.

Attributes (all optional)

datef – specify a date format using the PHP date format.

timef – specify a time format using the PHP date format.

sep – specify the character/text you want to use to separate the date & time.

format – define the output format using placeholders %date%, %time%, and %sep%. Other text can be used as well.

How to change the outputted date/time format?

By default, the plugin mimicks the time & date formats used in the same context (ie: admin tables, publish box) that WordPress uses.

As mentioned above, LMT uses PHP date format strings for the formatting of the outputted date & time.

To customize the output with a shortcode, use the attributes as described above.

To customize the output in an admin context, a filter may be used.

  • last_modified_timestamp_defaults – allows default values to be filtered. Shortcode attributes override defaults when present, otherwise there are defaults for shortcode output as well. Passes 1 parameter (array).

For example, if you wanted to change the time format in the admin messages that appear after a post is modified to a 24hr format with leading zeros, add this to your theme’s functions.php:

function my_lmt_defaults( $d ) {

    $d['contexts']['messages']['timef'] = 'H:i';

    return $d;
Template Tags

Models the function naming convention used by WordPress for get_the_content / the_content and similar functions.

  • get_the_last_modified_timestamp() – returns timestamp.
  • the_last_modified_timestamp() – displays/echos the timestamp.

These functions accept 2 arguments, both are optional:

  • $context (string) to output formatted according to a defined context (ie: admin messages, posts table, etc.)
  • $override (array) using this will override any defaults that are specified here, but output can still be overriden at final output.
    Example array structure is: array('datef' => 'M j, Y', 'timef' => 'g:i', 'sep' => '→', 'format' => '%date% %sep% %time%')


Nice but need update

Nice Plug in, but need update.
It dont function in 4.9.
Allso a funtion where I can select between top and Button position wouldt be nice.

Anyway 5 stars.

My site is here.

Perfect useful plugin

I am using this plugin and found it a perfect plugin, please in coming updates, do it more useful.

Thank you so much.

Very useful + 1 suggestion

Great job!
This plugin adds a missing WP feature, especially for sites where several users are editing pages/posts and you need to now when this last happened.

I don’t really understand why this is not part of core, but I would also suggest – if possible – to add the author of the last edit. Same problem here: WP not only displays just the date of initial publication but also the initial author only. It would really be extra-great if we could also get the author that has last modified a page/post!

Read all 19 reviews

Contributors & Developers

“Last Modified Timestamp” is open source software. The following people have contributed to this plugin.




  • Add automated tests


  • Template function bugfix


  • Min required WP bump to >= 3.2
  • PHP compatibility fix


  • General housekeeping & maintanence
  • Tested against 3.8


Major Update

  • Added support for all custom post types.
  • Added [last-modified] shortcode.
  • Added filters to provide complete control.
  • Added template tags.
  • Encapsulated code.


  • Added support for other types of update messages.
  • Added filter to allow output to be customized.


  • Fixed sortable column on pages table.


  • The Last Modified column in the admin post/page tables is now sortable!
  • CSS – widened Last Modified column to account for extra width needed for sortable arrow.
  • Updated screenshot of Last Modified column in the admin post/page tables.
  • Corrected a typo in the admin messages for pages.


  • Fixed date formatting in the admin tables.


  • Initial release