Automatically Change the Date After Editing a WordPress Post

Ahoy there folks – we’ve got another WPMU reader in need of some assistance. His name is Pedro, and he’s sent us a WordPress question about automatically adjusting the ‘published’ date of posts, after they’ve been updated.

How to change the date of a WordPress post that has been updated

With a bit of luck, some of you fine WordPress masters might be able to send some advice his way. Pedro asks:

Is it possible to automatically change the date of a wordpress post, after an update?

I am building a website with image galleries as posts. Each time I update a particular gallery, I want that post to display as the most recent on my site.

So if the gallery was originally posted three weeks ago, for example, when I update the images I would want the ‘published’ date to automatically change to the current date. I need the most recently updated gallery to always be the first post in the loop.

Is is possible to make WordPress do this?

Thank you!

-Pedro

Can it be done?

How to automatically change the published date of a WordPress postIs this something you’ve ever attempted with WordPress? If you have any ideas that you could share with Pedro, please leave a comment and the end of this article and tell us what you think. There’s nothing like the warm, fuzzy feeling of knowing that you’ve helped a fellow WordPress user solve a problem.

And remember that we’re still accepting WordPress questions from our readers. If you’re trying to solve a WordPress problem of your own, tell us about it! The most interesting questions we receive get published here on the blog, and the author wins three months of full access to WPMU DEV: home of the most awesome WordPress technology on the planet.

So get involved! We look forward to hearing from you.

Photos: Gruntzooki and Pedro Vezini.