How To Show Last Updated Date In WordPress – Guide For Non-Tech-Savvy Bloggers

Last updated on May 5th, 2018

Have you ever wonder how to show last updated date in WordPress? I have! The thing about WordPress is, it normally shows the date when a post was last published. 

 

Keeping your old posts relevant is by updating it. It is also important that your readers need to know you have updated the posts and what they are reading is still relevant. Even though my blog is still quite new, I feel that it is better for me to find out now how to do it than later.

 

How To Show Last Updated Date In WordPress

How To Show Last Updated Date In WordPress

 

Thus, since the start of last month, I have been trying to find a way to show last updated date on my WordPress posts.  I do go back to do some update or changes to my posts when I see a need but were unable to show the updated date, that made me frustrated.

 

To make thing clear, I am not a tech-savvy person. When I first started searching on Google for help regarding this topic, all I got were a lot of tech-savvy guides. Thus, is not that there is no help. Is just that all are too technical for me.

 

Last Thursday, while still searching for an easy way to do this, I chance upon this website: Shout me loud

 

Their method is super easy even I as a non-tech-savvy blogger know how to do it. Super happy I am!

 

What this method will do is, it will still show your posts published date and when you did some modification to your posts, it will show the updated date.

 

This is how it looks like in my post:

 

How To Show Last Updated Date In WordPress

 

I believe the placement for the date will depend on the theme you used for your blog. 

 

I did make a modification to the original text “This post was most recently updated on” to “Last Updated On”.

 

For my Homepage, this is how it looks:

 

How To Show Last Updated Date In WordPress

 

Here is how I do it:

 

Step 1:

You need to download a free WordPress plugin: Code-snippets

 

Code-snippets is an easy and simple way for a non-tech-savvy blogger, just like me, to add code-snippets to our blog. It removes the complicated way of adding custom snippets to your theme’s filefunctions.php.

 

Once you installed and activated this plugin, in your WordPress dashboard, go to Snippets and click Add New.

 

Then, paste this code snippet into the Code box:

 

function show_last_modified_date( $content ) {
$original_time = get_the_time(‘U’);
$modified_time = get_the_modified_time(‘U’);
if ($modified_time >= $original_time + 86400) {
$updated_time = get_the_modified_time(‘h:i a’);
$updated_day = get_the_modified_time(‘F jS, Y’);
$modified_content .= ‘<p class=”last-modified”>This post was most recently updated on ‘. $updated_day . ‘</p>’;
}
$modified_content .= $content;
return $modified_content;
}
add_filter( ‘the_content’, ‘show_last_modified_date’ );

 

Select the box for “Only run on site front-end”. Then, click Save Changes and Activate at the bottom:

How To Show Last Updated Date In WordPress

 

You are done! That is fast right?

 

Related posts:

 

And if you haven’t yet, join my Facebook Group: Blogging For Beginners Support Group

 

Disclosure: I sometimes use affiliate links to products that I recommend, this means that, at zero cost to you, I may earn a commission if you buy something through my links.

 

Exploringim.com

 

 

Spread the love, share with your friends
  • 2
  •  
  • 415
  •  
  •  
  •  
    417
    Shares
  •  
    417
    Shares
  • 2
  •  
  • 415
  •