How to Display Relative Dates in WordPress

Have you ever seen this in blog posts and comments and wondered how did this blogger manage to do this? Actually it is pretty easy.
You would need to download a plugin called WP-Relative Date
Once you have downloaded and activated the plugin, look in your single.php, index.php, and page.php for this code:
Displaying Relative dates is a thing that you often see in Social Media sites like Digg where it says submitted 23 mins ago. A similar concept can be used for Blog posts and comments in WordPress where you can display relative dates as timestamps. This is a good plugin to use in the comments because it helps interaction and shows activity within the blog.
1 | <?php the_date(); ?> |
Replace it with:
1 | <?php relative_post_the_date(); ?> |
How to Display Relative Dates in WordPress
Reviewed by Unknown
on
1:52 AM
Rating:

No comments: