Show the Last Updated Date of Your Posts

Basically, WordPress shows the publish date of the post/page when that post was created. It is the default functionality in all themes. But if you want to show the last updated date of your posts then you have to write a couple of lines of code in the functions.php file.

By doing this, the user can see when the post was updated and this is a piece of current information.

To make this happen, you need to add the following code in the functions.php file.

Save the functions.php file and see the result of any post. You will see the last updated date of your posts will appear and You can modify it as per your requirement.

The functions reference:

About the Author: Aman Mehra

Hey! I'm Aman Mehra and I'm a full-stack developer and have 5+ years of experience. I love coding and help to people with this blog.

Leave a Reply

Your email address will not be published.