Connect with us

Display Last Updated Date of WordPress Posts

solution

Display Last Updated Date of WordPress Posts

Do you want to highlight last updated date of your posts? Here is the easiest method for you to display Last Updated Date of Posts in WordPress. Read the complete article and learn how to highlight last updated date of WordPress Posts.

How to Show Last Updated Date of Post in WordPress?

WordPress is used for many reasons. Some users are using WordPress for blogs, others are news sites. Sometimes, there might need to make updates to published post. In this article, we will share you how to highlight updated date of Posts in WordPress. Take a look at it and learn step by step process for displaying last updated date of WordPress Posts.

What is the need to Show Last Updated Date of a Post?

If you publish a WordPress post on May 18, 2016, after one month, you found additional data related to that post. So, you have updated that post. But still, it shows the published post date. The visitors are unable to recognize, the article is updated. So, you have to highlight last updated date of a WordPress Post.

How to highlight the WordPress Post updated date?

There are 2 different ways to display Last Updated Date of Posts in WordPress. Follow one of those methods and display updated date on posts in WordPress.

Show Last Updated Date of Posts using Code

  • First, Login to your WordPress admin.
  • Click on Editor option under the Appearance Section.
  • Open the given 3 files.
    • index.php
    • single.php
    • page.php
  • Next, you need to search for the given code.
<?php the_modified_time('F jS, Y');?>

There are various formats for displaying date. So, you may not see the exact code, but something similar to this line.

  • After finding that code, you have to replace that code line with given 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'); 
echo " at "; 
the_modified_time(); 
echo ", "; } ?>
  • Next, click on the Update File Button.
  • Now, the file is updated. The Last modified date will be displayed on the screen.
Related:  Best Responsive WordPress Travel Themes

Display Last Updated Date of Posts using WordPress Plugin

The easiest way to show the last updated date of Posts in WordPress is by installing WP Last Modified plugin. This is a better option than editing the theme files. The installation and configuration process for WP Last Modified plugin is provided here. Take a look at it and learn how to highlight the WordPress Post updated date.

  • Login to your WordPress admin.
  • Next, click on Plugins option.
  • Now, click on the Add New option.
  • Enter WP Last Modified in the search Plugin field.
  • Now, the WP Last Modified WordPress plugin appears on the screen.
  • Next, click on the Install Now Button from that WP Last Modified Plugin.
  • WP Last Modified Plugin is now installed on your WordPress website.
  • Click on the Activate button.
  • Now, the WP Last Modified WordPress Plugin is installed and activated successfully.
  • After activation, click on WP Last Modified option under Settings section.
  • Now, put a check mark behind check to activate.
  • Select the position where the updated date display.
  • Select format of the date you want to display.
  • Enter the verb to display the update date.
  • Put a check mark behind check to activate for activating last updated date on posts.
  • Put a check behind check to activate for activating updated date on WordPress pages.
  • Now, click on save changes button to store the changes you done.
  • Try to update a post and check the updated date is displayed or not.
Conclusion:

Hope this information is useful for you to show Last Updated Date of WordPress Posts. If you face any WordPress Error, visit our site and get a quick solution. Here you can also find Free Online WordPress Tutorials.

Continue Reading
You may also like...

We are a WordPress plugin developer company that focuses on useful WordPress plugin creation and empowering people to earn passive incomes from their blogs. We build unique and groundbreaking plugins that will revolutionize your blog!

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in solution

    Sign up for our newsletter and get a free affiliate e-book!


    About Me:

    Szabi Kisded

    Hi, my name is Szabi and I'm documenting my journey selling plugins on CodeCanyon. I will show you every step of it: learning to code, plugin ideas, WordPress stuff and more. Read more…

    Mega Plugin Bundle:

    CodeCanyon Portfolio:

    Learn to Code Plugins:

    Latest Promotions:

    Recommended Theme:

    Start Your Own Blog:

    Recommended VPN:

    Translate Your Blog:

    AdSense Alternative:

    Best Article Spinner:

    Popular Posts:

    Latest Posts:

    To Top