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.



