Change Last Modified Date

Plugin Banner

Change Last Modified Date

by djuric

Download
Description

Using this plugin you can easily change or prevent updating the last modified date for each post. Controlling the last modified date can come in handy when you would like to control “order by last modified” for posts (or custom post type).

When this plugin is active it will enable Last modified date options in Status & Visibility panel in sidebar. Changing the modified date can be done by clicking the date link and selecting a new date for the post. It’s also possible to disable future updates of the last modified date by setting the “Freeze modified date” option to on.

Custom post types support

To update the last modified date, plugin is using “rest_pre_insert_{$post_type}” hook which is executed before “init” where other custom post types are usually registered. This is the reason why plugin is not aware of any additional post types other than those registered by WordPress core. To support additional post types you can add constant in following format to wp-config.php:

define( 'CLM_DATE_POST_TYPES', ['post-type-slug-1', 'post-type-slug-2'] );

Custom post types are also required to have “custom-fields” support declared.

Support

For support or code contributions please refer to Github repo.

  1. Upload zip package to Plugins > Add New in admin of wordpress.
  2. Activate the plugin.
  1. screenshot-1.png

    screenshot-1.png

Would be great if work with classic editor

By anonichan on February 16, 2025

I mean I can switch to block editor to use it, but then the post type has to be REST API available that's not ideal. For now it works if I rollback to version 1.2.

Amazing plugin for feature that should’ve been native

By karlemilnikka on August 22, 2024

The ability to control the last-modified date should be a native feature of WordPress. This plugin adds the missing functionality, exactly that, and more than that. What more could I ask for? 🙂

Works good so far

By Laura (lauraxrammstein) on March 26, 2024

I was looking for something to change the modified date or "freeze" it completely when I made only minor changes.

This plugin ticks all boxes and works great so far. The "freeze" option works well but I have to test a bit more.

So far I'm happy.

It seems to still work on current WP ver. 6.1.1

By hero2 on March 26, 2023

I use the current WordPress version 6.1.1 with the Astra Pro theme (and Spectra). I could change the Last Updated Date on all my Posts using this plugin.

You just have to be aware that if you change something else in a post, then the date will be updated to the current point in time, and you have to change it back, unless you use the "Freeze modified date" option.

Currently does not work with classic editor

By nimmolo on April 21, 2021

Would love to use this plugin, but it doesn't work with the "classic editor" anymore. The author suggests using an earlier release, but I went back to version 1.3 and 1.2, and neither of them worked for me either. I code and manage a lot of commercial websites, and none of them uses Gutenberg, it's too easy for clients to mess up sites with it.

Love this plugin

By zalon on April 29, 2020

We love this little plugin. It does not add much overhead to the admin interface and simply does it's job.

Awesome

By lemming2030 on April 21, 2020

Super simple and elegant. The best plugin of its kind. Thank you.

Do not work with gutenberg.

By Ozan Canakli (ozancanakli) on January 31, 2019

Do not work with gutenberg.

Works as intended

By diegocanal on August 23, 2018

Thanks @djuric for sharing this useful plugin!

Works fine, but ...

By rolandassisla on April 17, 2018

I could not install it. But I put file 'update-last-modified.php' in Code Snippets, and it does its job.

1.0

  • Initial release.

1.2

  • Remove unnecessary directory

1.3

  • Rewrite the plugin for new block editor

1.4.2

  • Fix plugin crashing for custom post types without custom fields support declared

1.4.3

  • Update wp-scripts to v26.1.0
  • Remove/update deprected props and functions

1.4.4

  • Update wp-scripts to v26.1.0
  • Revert back to using __experimentalGetSettings from @wordpress/date

1.4.5

  • Use correct text domain
  • Register translations via wp_set_script_translations()

1.4.6

  • Fix timezone issue when displaying last modified date
  • Use 12h format in datetime picker when appropriate
  • Add button to copy published date
  • Use official getSettings instead of __experimentalGetSettings from @wordpress/date

1.4.7

  • Build files for production

1.4.8

  • Fix GTM date so that it matches current time zone settings
Back to top