Home > Tips & Tricks > Show the Last Updated Date of Your Posts

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:

Photo of author

About Aman Mehra

Hey there! I'm Aman Mehra, a full-stack developer with over six years of hands-on experience in the industry. I've dedicated myself to mastering the ins and outs of PHP, WordPress, ReactJS, NodeJS, and AWS, so you can trust me to handle your web development needs with expertise and finesse. In 2021, I decided to share my knowledge and insights with the world by starting this blog. It's been an incredible journey so far, and I've had the opportunity to learn and grow alongside my readers. Whether you're a seasoned developer or just dipping your toes into the world of web development, I'm here to provide valuable content and solutions to help you succeed. So, stick around, explore the blog, and feel free to reach out if you have any questions or suggestions. Together, let's navigate the exciting world of web development!

Leave a Comment