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.

Featured Plugin - WordPress Facebook Plugin

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Photos: Gruntzooki and Pedro Vezini.

Tags ,

Comments (2)

  1. hi everybody.
    My question is not exactly the same but it is also connected with date management. I was wondering if it would be possible to automatically update the value of a customfield that contains a date ? let’s say i post an article for a travel that i make every week : the customfield is initially filled in with a date (let’s say ’2nd of April’); i would like the database to be automatically updated so that next week the post display ’9th of April’, or ’23rd of April’ 3 weeks later.
    I know it ‘s a bit tricky, but i would love to find a way to solve my issue.
    thanks to all.

Participate