How to Show Last Updated Date on WordPress Posts

If you are maintaining reference blog or website that updated on regular base, but whenever you update your blog, you are mentioning updated on : date like that on each update. If you want to display date to update and reflect the date it was last modified rather then the day it was published, this might be best solution for you.Showing last updated date on post will increase readership because it help readers to identify when this post was last updated. Also search engine’s spider would love to crawl it because they like to have fresh or updated content. Recently we have discussed about Removing date stamp from blog post to hide last updated or published date.

If your blog got hit from recent search algorithm update, you should try this. Bloggers can survive on this competitive era of algo updates only by trial and error method. I have first tried removing date stamps from my blog posts and now I am implementing this feature of showing last updated date on my blog posts.

The Last Modified dates on the post is used to tell the readers and search engine bots (Google, Yahoo!, Bing etc.) when webpage is updated lastly. People will know the freshness of that web document, and Web crawlers can also decide, whether there’s any need to save a new copy of that webpage to update their indexes, or not.

If you want to play with coding and theme modification, you need to follow below tutorial to set last updated or last modified date on your blog posts. We have to modify codes in single.php WordPress file as mentioned by wphacks so make sure you are backing up your single.php file to your computer before proceeding to next steps.

Look for the code that displays the post date. It should look something like the following:

Published on: <?php the_time('l, F jS, Y') ?>

We have to modify the code that looks like above as per below. All you need to do is replace the above code with below one.

Posted on <?php the_time('F jS, Y') ?>
<?php $u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time != $u_time) {
echo "and last modified on ";
the_modified_time('F jS, Y');
echo ". "; } ?>

This code will replace your original published date with last modified date and time. Now check your blog post for updated date instated of published date.

Now if you don’t like to play with codes, there is great WordPress Plugin to show article updated or modified dates on your blog post.You can use  WP Last Modified WordPress plugin to do this task.

WP Last Modified  Plugin Setting

You will also be able to add Revised Meta data to your posts and pages through this plugin, but that is completely optional.You will need to check the box at the first to activate this plugin. You can manually set the position of last updated text below or above article. Also you can modify the text. e.g. last modified or last updated, like that. You can also display this updated date option on your post or pages.

Let us know which method or techniques to show last modified WordPress Date Time on WordPress blog posts, feel free to share below.

One Comment

  1. WP Last Modified WordPress plugin shows the year 2013 in post updated time.
    Please tell me solution for this.

Comments are closed.