Home / Webmaster / How to Display the Last Updated Date of Your Posts in WordPress

How to Display the Last Updated Date of Your Posts in WordPress

WordPress a CMS that mostly use in website backends. With the help of WordPress the management of content is very easy. Publish date and updates also an impact on Google ranking. It also displays the publish date in the SERPs, informing searchers as to how timely the post is published.if your content is as relevant today as the day it was published, Google searchers will still regard a two year old post with suspicion, though.

If your content is as relevant today as the day it was published then, Google searchers will still appreciate a two-year-old post.

To get around this problem, many WordPress users will update their best content regularly. Sprucing up your older content will keep your visitors engaged, but, most importantly, it ensures the content is still relevant. Unfortunately, WordPress would not display that your content has been updated or not by default.

There are Two methods that we discuss in this Post. First is with manual code and second is with WordPress Plugin.

How to Display the Last Updated Date of Your Posts in WordPress

 

Step 1:

First, you need to open these three files in edit mode:

  1. index.php
  2. single.php
  3. page.php

Then you will need to find the following code lines:

“<?php the_time(‘F jS, Y’);?>”

Note: Since there are so many formats of displaying dates.

Replace it with this code:

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

 

Step 2:

 

If you want to display your content’s last updated date, you need the WP Last Modified plugin that is available free from the WordPress repository.

Using Last Modified Timestamp:

Let’s start, and installing the plugin.

From the WordPress dashboard, navigate to Plugins > Add New. Using the search plugins field, search for ‘WP Last Modified.’

When you have found it, then click on Install Now > Activate the plugin.

How to Display the Last Updated Date of Your Posts in WordPress

This plugin has two equally important functions:

  • It displayed when your content was last modified.
  • It also tells the search engines when your content was last modified by adding a revised meta tag to your post.

With this updated information, your content is more likely rank well in the search engines.

This plugin is very easy to use, just with few simple fields configuration. To start configuring this plugin, go to Settings > WP Last Modified.

 

How to Display the Last Updated Date of Your Posts in WordPress

There is two part to the configuration screen:

  1. Last Modified Timestamp for visitors.
  2. Revised Date Meta Information for search engines.

Start with the Last Modified Timestamp section.

Now, to display your timestamp, you have the need to activate it If you tick the checkbox in the Show Last Updated Timestamp field then You Active timestamp.

How to Display the Last Updated Date of Your Posts in WordPress

You can also customize how the timestamp will appear. You can also choose where on the post or page to display the timestamp and select the date format, and the text displayed.

How to Display the Last Updated Date of Your Posts in WordPress

You can complete this task just in few seconds.

Now Next, move down to the Revise Date Meta Information section.

You can choose to activate the revised date meta tag simply by checking the two activation check boxes.

How to Display the Last Updated Date of Your Posts in WordPress

 

When you are done all changes then, make a sure hit on Save Changes button.

After this Automatically Your posts will display the date of last modification Timestamp.

For confirmation just update any old post and Preview this post.

Displaying the last update stamp can give you a significant impact on your website’s ranking and visitors trust on your content.

4 comments

  1. thanks sir main esi type ki post search kar raha tha…

  2. Hi Sir
    It’s Nice post
    but i want to know, can i change my previous articles?
    Waiting for your reply

Leave a Reply

Your email address will not be published. Required fields are marked *