How to Display the Last Updated Date of Your Posts in WordPress
Do you want to show the last updated date on your posts in WordPress? Well keep reading because I’ll show you just how you can do that and by the end of the article your posts will go from looking like this
to looking like this
So if you’re ready let’s get started. To make the changes on our site we’ll be adding this bit of code to our functions.php file in our theme
So we’ll copy that
and as with any changes that we make to our website do make, sure that you backup your website before you start. The easiest way to make these changes is by using an FTP. I’ll be using FileZilla for this article,
once you’ve connected to your website, scroll down.
We’re looking for our wp-content folder,
our themes area
and you’ll want to update the theme that you are currently on. We’re using 2017 theme
and we’re looking for the functions.php page.
I’m going to right click and download this locally to my hard drive
and once it’s downloaded let’s go ahead and open it with our text file editor
and once we’re in here I’m just going to scroll all the way down,
find a new line, and add the function here.
You want to save it, what the code does is it checks to see if the last updated is different from the publish date and if it is then It’ll show the updated date and time for you.
Once we save that let’s go ahead and upload it back.
Now that I’ve updated that and uploaded it to the website I’m going to go to a post
and I want to update a post. So we’ll update this one it was published in June.
We’ll make a change, we’ll update that,
and now I want to open it in a new tab
and see what it looks like you see up here it’s showing published
and down here saying last updated and the time that it was updated and now that’s a quick and easy way to show the last updated date on your WordPress website.