How To Display Post Last Update Time

Recently I had to do something that oddly enough, never had to do before. It is odd because this is something quite basic and we’ve been using WordPress on a wide variety of sites and project for years. Just goes to show, just when you thought you knew WordPress like the back of your hand, you learn something new.

I found myself updating a particular post several times a day and because there were other people checking on that one page throughout the day. So I really needed a way to display a ‘last updated’ time and of course I wasn’t going to this manually. WordPress already saves this information so why not use it?

Thankfully there is already a template tag for this, the_modified_date tag. You can also use the the_modified_time tag which does the same thing but it seems like the_modified_date has a few more parameters you can make use of.

Yet it still wasn’t quite what I wanted. I didn’t want to use the tag in the theme but on just one particular post. That is easily solved. Install a PHP code plugin like PHP Execution. Then you can pop the tag directly into the post or Page in HTML  mode.

Scroll to Top