Friday, September 10, 2010

Show last edit time into Wordpress

January 28, 2010 by admin · Leave a Comment 

If you would like to show when the article was last edited you need to put the following code to the theme that you use.

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');</div>
<echo ". "; } ?>
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 ". "; } ?>
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • Netvibes
  • Reddit
  • RSS
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Twitthis
  • Blogosphere News
  • email
  • LinkedIn
  • Linkter
  • Live
  • MyShare
  • MySpace
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Related posts:

  1. show last comments with the avatar in wordpress
  2. show most commented pages with images in Wordpress
  3. Custom css for article
  4. show only some categories o wordpress menu
  5. Display last tweets on your wordpress blog

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

SEO Powered by Platinum SEO from Techblissonline