Sep
16

Hi,

In many cases you may want to display updated date of your post meta data rather than showing just the original published posting date. For that you need to edit the single.php file of your theme. Before edit the single.php take a backup of this file.

Now, find the Code:

Posted on: <?php the_time(‘l, F jS, Y’) ?>

Replace with:

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 “. “; } ?>

Now your posts will shows the last modified date immediately after the original published date rather than just showing the original post date.

That’s it!

Thanks,

Shane G.

Popularity: 1%

Related posts:
  1. Customize Date Image Customize Date Image You can place your own image for...
  2. How TO Display Latest Author Who Has Modified The Post In Wordpress Blog Hi, Wordpress 2.8+ has new feature of the_modified_author() which allows...
  3. How To Display Today’s Date On Wordpress Blog Hi, Many wordpress users wants to display today’s date at...
  4. Time Release Wordpress Plugin Hi, This plugin is used to setup your blog to...
  5. How To Display Sidebar At Index Page For Single Post? Hello All, In order to display sidebar at index page...

Leave a Reply

You must be logged in to post a comment.