Home « SEO « WordPress Show Post Update Time
WordPress Show Post Update Time

WordPress Show Post Update Time

Here you will able to read about WordPress show post update time instead of published date. Furthermore, you see on the web WordPress use for many purposes like for news, blogs or business websites. So when you make changes in your blog. Then you also want to show update date in your article. So in this tutorial, you will see how to about WordPress show post update time.

Furthermore see an example if you published an article on Feb, 20 2015 and make some updates in it after a week. Then obviously you want to show date Feb, 27 2015 instead of published date. So here you will see the method how to do?

WordPress Show Post Update Time By Editing The Below Files

Now read WordPress show post update time by editing the below files. First, you need to access the below files for making some changes in it:

  • single.php
  • page.php
  • index.php

After it just trace out the below code.

<?php the_modified_time('F jS, Y');?>

Now just replace the above code with the below one:

<?php $u_time = get_the_time('U'); 
$u_modified_time = get_the_modified_time('U'); 
if ($u_modified_time >= $u_time + 86400) { 
echo "and last modified on "; 
the_modified_time('F jS, Y'); 
echo " at "; 
the_modified_time(); 
echo ", "; } ?>

This was the method WordPress show post update time and date instead of instead of published date. Now just see if you want to show just date not time then place the below code:

<?php $u_time = get_the_time('U'); 
$u_modified_time = get_the_modified_time('U'); 
if ($u_modified_time >= $u_time + 86400) { 
echo "and last modified on "; 
the_modified_time('F jS, Y'); 
} ?>

However, if you have failed to find the code in your these files. Then see how to change it. Often beginner doesn’t trace out the code. By the way, if you are using Sahifa template. Then just follow the route to get the details. After it just change to it the above code which you have read.

WordPress Display Post Updated Date

Lastly just see the second method of WordPress display post update date. However, you are using Sahifa theme. Then you can trace out the met post file by the below method.

CPanel » wp-content folder » themes » current theme » framework » parts » meta-post

Now read the article to access these files How To Access function.php? After that opening the current theme folder here you will find framework folder. Just open it and here you will see parts folder. Now here you will see the meta-post file. Open it and paste the below code like shown below:

<?php if( tie_get_option( 'post_date' ) ): ?>

WordPress Show Post Update Time In Meta Data

Lastly, I want to give you an extra tip. If you want to show last updated date like our blog. Then insert the below line in your post meta file. While you can access your post meta file by the above told method.

Last updated on <time datetime="<?php the_modified_time('Y-m-d'); ?>"><?php the_modified_time('F jS, Y'); ?></time>

I hope you have understood about WordPress show post update time. In the case of any difficulty, you can send us Tweet or message to Facebook.

Helpful Articles

Remove Date WordPress Posts

function.php File WordPress

Which Is The Best Between WordPress Vs Ghost?

AUTHORED BY Muhammad Awais Azeem

"Global Blurb since 2015" M. Awais Azeem is the CEO and founder of Global Blurb. The blog designed to share ideas about different topics. My profession is Accountant and I have completed CA Inter from Institute of Chartered Accountants of Pakistan. Me and my time present to sort out any issue regarding SEO, Blogging, Content Marketing and WordPress. Hire Us and Goodbye difficulty.

Want to contribute