Display the Last Modified Date for your posts on Wordpress
Wordpress now a days is being used as more than a blog. People are using it for many different reasons. One of the cool parts of this software or any other blogging software is that it lets you post mark the date the article was published on. Which is great. But what if you have to make updates and still let the readers know that you updated it.
So basically if you are running a contest, and it is one of your featured posts, so your readers can check it. You can use these codes to display the last date the post was modified on, so they know how recent the information on that contest page is.

Well I was thinking about it and I came across a site called Adramis where I found this code.
So basically all you have to do is head over to single.php and/or page.php and search for
Posted on: <?php the_time(‘l, F jS, Y’) ?>
It might not exactly be like that but definitely have something like that. Well now all you have to do is replace it with the codes below:
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 when you write a post, it will show the post date, but once you have modified anything the date will change. This looks like a great tool that you guys can use and implement into your site.






















Hey, I am Syed Balkhi, The guy who is behind Balkhis Inc. I entered the industry back in 2002 not knowing a single thing. I barely spoke English at that time. In the past six years, my language barrier has been eliminated. Aside from English, now I also speak html, and php. Along with the languages I have also managed to master a few arts. Art of web-designing started when I first entered. Messing around with photoshop, I learned how to create my first web design. Now I founded a web designing firm Uzzz Productions. After running numerous amount of websites in various niche, I have mastered the art of web-development. Now I am compiling a resource of what I already know, and what I am learning on this blog. This resource is to help me if I ever need a guide to look back to, and it is help my fellow webmasters.




Certainly sounds interesting; your readers can know how up to date what they are reading it. Thanks for passing on the information.
Thats a nice tutorial
Thanks for sharing.
that’s really handy, but i was also wondering if you know how to create a featured post on the home page?
Yes I do. You can either make one specific post sticky by just checking it to be sticked in wp 2.7
Or you can use the technique problogger and JC are using right now. They write all of their features post into featured category and pick the latest ones out to display on the home page.
Thanks Syed, I will probably just wait till 2.7 is released (out of beta stage)
That’s very cool when you have some landing pages on your blog like good lists or something like that. Thanks for the tip!
Its very nice and easily we can know the exact date that the article was published and i really appreciate ur efforts for sharing with us…Implemented
-ZK
Nice thing to make your blog more user friendly and convenient for your readers. Good thing to bring it to our notice. Thanks for the information Syed.