Code Snippet Tutorial – Display Time Span of WordPress Post

This small code snippet will help you display the time span of a WordPRess post for your fellow readers and is simple to implement if known how.

I’m sure you have seen some websites whereby they display the time span of the post and you wonder how it was done. This is a very simple technique and can be implemented in less than 5 minutes.

Please make sure you backup your themes custom_functions.php or functions.php file before you try this.

post code snippet Code Snippet Tutorial – Display Time Span of WordPress Post

This tutorial has been written for WordPress theme users and this simple function can be inserted within your functions.php/custom_functions.php file.

All you have to do is copy and paste the function from the download file and then reference it where you want it displayed. It should not take you longer than 5 minutes to implement.

Below are a few examples:

code time span of post 1 Code Snippet Tutorial – Display Time Span of WordPress Post

Example 1: Display Time Span of Post

As you can see above, I have used this code snippet by the display of statistics on posts.

code time span of post 2 Code Snippet Tutorial – Display Time Span of WordPress Post

Example 2: Display Time Span of Post

As you can see above, I have used this code snippet by the display of recent posts.

Code Snippet - Display Time Span of Post

The download was made available on 22 July 2010 and is in zip format. The file size is 508 bytes and has currently been downloaded 358 times.

Final Thought

So, how easy did you find it to implement? Would you use this on your current website? I would like to hear your opinions on this code snippet, so make sure to leave a comment.

You could go view the rest of my free downloads to see if you can find something that can help you or your business.

  • Twitter
  • Digg
  • Delicious
  • Submit post to StumbleUpon
  • Submit post to Facebook
  • Submit post to LinkedIn
From the desk of George Serradinho

I am the proud owner of Serradinho.com and have made this my second home. I'm into blogging, downloads, WordPress, meeting and helping others, etc. Basically the internet in general :) Serradinho Web Services is my own company whereby I offer my services to clients. This ranges from web design, website upgrades, theme customizations, support, premium WordPress plugins and many more .....

View all posts by , there might be other posts that interest you.

{ 4 comments }

Tinh August 15, 2010 at 4:18 am

Great tips and I am thinking whether to integrate on my new blog or not. Thanks

George Serradinho August 16, 2010 at 8:05 am

@Tinh – this is just something to spice it up, but is not a must. Let me know if you need help or not.

Flicks August 15, 2010 at 6:25 am

Displaying the time span of posts is definitively useful and makes a good impression. It tells the visitor the age of your post more easily, better then using a calendar date.

Thanks for providing this useful code snippet/download.

Dev @ Best WordPress Themes August 15, 2010 at 10:53 am

Hey George,

Great Post. I think displaying time span is really great idea. Going to try it on my blog.
Thanks for sharing.

Comments on this entry are closed.

Previous post:

Next post:



    

Join our Revenue Sharing Program today.

Follow George Serradinho on Twitter - username: @gfserradinho.   Connect via Facebook.   Connect via LinkedIn.   Follow George Serradinho on Google.   Connect via YouTube.   Connect via Skype.

*/ ?>