How To Show “Last Updated Date” In WordPress

Table of Contents

If you're a blogger, an online news publisher, or the owner of any other kind of article-based website, it's critical to inform your visitors that the articles you publish are current and fresh. Even though doesn't come with this feature out of the box, adding the “last updated” date to your WordPress posts or pages is easy.

Today, I'll show you how to view the date when your article was last updated and make things simpler for your website visitors with a few easy measures.

Using to Show Last Updated Date

I use Elementor for most of my websites as its well coded and has a good community around it. This will also be my recommended way to display Last Updated status on your WordPress Posts or Pages.

You may use the Post Details widget to view the post meta while building a single post template with Elementor (date, author, and so on). This widget displays four pieces of information by default: Author, Date, Time, and Comments. To view the last edited date, edit one of those items — or add a new one.

To begin, drag the Post Details widget to the region of your page where you want the last edited date to appear. Then, on the left panel, make the required adjustments. Adjust the form of one of the products (or make a new one) to Custom.


Click the Dynamic link on the Custom option and select Post Date.


Adjust the form to Post Modified by clicking the wrench icon next to the Post Date field. By selecting the Format option from the dropdown menu, you can change the date format.


You may use the Advanced option to add text before or after the date.

Show Last Updated Date With

I don't usually recommend using plugins for this function in WordPress. But if you are out of time or have very little knowledge of coding or WordPress files a good plugin can help. A plugin named WP Last Modified Info is a good choice to go with.

This plugin adds last changed or revised information to your WordPress posts (including custom post types) and pages automatically. For a manual insert, the shortcode [lmt-post-modified-info] can be used. This plugin also automatically applies the ‘dateModified' schema markup to WordPress posts, which is used to tell search engines like Google and Bing when a post or a page was last updated.


This plugin allows you to view Last updated details in your posts and pages individually. You may choose to have the last modified/updated date appear above or below your posts and pages. In WordPress Posts and Pages, you can also define date/time formats and the location of the timestamp, which can be either before or after the content.


It also allows you to customise the text that appears next to the last updated date (default: Last updated on).


And the part which I liked is that you can edit the last changed date and time from the post edit screen as well as the simple edit screen.

Use Theme Templates to Show the Last Updated Date

Another choice is to use the template file included with your theme. For the purpose of viewing posts, most themes use various templates, such as single.php, index.php, archive.php, and so on.

Find the code that shows your date and time in the file, and either replace it with the one we'll share with you below, or insert it right underneath the theme's “date and time” code. The former will only show the most recent update date of your post (not the original publication date), while the latter will show all dates above your content.

For this, I used the Twenty Seventeen theme. The template-tags.php file contains the date and time code for this theme.

I found the function ‘twentyseventeen time link' and put the following code directly below the ‘get the time' line:

$u_time = get_the_time('U'); 
$u_modified_time = get_the_modified_time('U'); 
if ($u_modified_time >= $u_time + 86400) { 
echo "

Last modified on "; the_modified_time('F jS, Y'); echo " at "; the_modified_time(); echo "

"; }

The same code can be found in your theme's template file.


When you're done, simply click the Update File button, and your post will now reveal the date it was last updated.

And this is how it looks on our end:


Using Functions.php to Display the Last Updated Date

You'll need to add a line of code to your theme's functions.php file to display the last modified date before your content.

In your admin dashboard, go to Appearance >> Theme Editor and search for your functions.php file in the Theme Files list.


Then, at the very end of the file, add the following code:

function my_last_updated_date( $content ) {
$u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time('F jS, Y');
$updated_time = get_the_modified_time('h:i a');
$custom_content .= '';
$custom_content .= $content;
return $custom_content;
add_filter( 'the_content', 'my_last_updated_date' );

The code works by evaluating if the published date of the post in question varies from its last changed date. If these two dates aren't the same, the most recent updated date will be shown.


Be sure to click the Update File button after you've entered your code.

You can also add custom CSS to your theme's stylesheet (or go to Appearance >> Customize and use the Additional CSS option) if you like. For instance, this code can be used as a starting point:

.last-updated {
font-size: small;
text-transform: uppercase;
background-color: #fffdd4;

Here's how our final product looks:


When Do You Use the Last Updated Date in Your WordPress Posts or Pages?

The date of publication for each article is usually shown in most WordPress themes, and this is also how most websites operate. However, for various reasons, several websites publish material that is updated on a regular basis.

In the case of a news website, for example, there's a good chance that an older article will need to be changed at some stage. This will be an update of the most up-to-date information on any current events relevant to the subject that have occurred since the article was published, i.e. since the article was published. Also, time-sensitive details can be found in online guides, product and service reviews, tour guide posts, and so on. Pricing, changes in product features, terms of use, and other factors may all affect the relevance and freshness of this form of content. As a result, they should be updated on a regular basis. Showing the last updated date on your posts can be a good idea if you want your users to be aware of those updates.

Furthermore, even though they appear at the top of Google search results, many users will ignore articles that are more than two years old as no longer important.

The reality is that the older your post is, the less likely it is to be clicked on. When it comes to Google's ranking algorithm, this aspect is also taken into account, and the date a post was published (or updated) is shown in SERPs.

Having said that, there are articles from years ago that have evergreen content that is still significant today. Nonetheless, several websites make it a point to update these types of articles on a regular basis in order to avoid squandering their ability. They're signalling to consumers that the content they're interested in is still new in this way. If you're one of the people who wants to keep their high-quality posts from going unnoticed (and who wouldn't? ), I recommend that you do the same.

Though WordPress does not have a default option for displaying the last updated date of your post, it is often possible to do so manually. All you have to do is add a few lines of code to the WordPress theme files or use Elementor Page Builder as I recommended in the starting of this blog post.

Final Words

Not only is it important to show the article's last updated date, but it's also important to inform your readers that the article they're reading has been updated. It's also crucial for SEO purposes. Regularly updated webpages are preferred by search engines because they show that the posts are more important to the readers.

If you are looking to add Google Search to your website, do check out this article as well, How Can You Add Google Search to A WordPress Website

Let me know in comments if this article was helpful to you.

Share This Article:
Related Articles:
image size reduce online
Free Image Size Reduction Trick

Without Any Plugin Did you know that a normal website gets most of its weight from the images used in it? It is true. The majority of website size is mostly because of the images used in its pages. Optimizing images without losing quality is a difficult task for average

Read More »
free wordpress hosting
Host Your WordPress Website For Free Forever

Hosting a WordPress website can be an expensive thing if not done properly. It can go from just a few dollars to thousands of dollars a month. Finding WordPress hosting can be a difficult task. If you own a small blog or website that you do not update often then

Read More »
free high quality backlinks
Get Free High Quality Backlinks The Creative Way

A backlink in the SEO world is a link from a post or a page on one website to another. If a website is linking to your content, it means you got a backlink. These backlinks are also called “inbound links”. Sometimes they are also called “incoming links”. Carrying a

Read More »
feature snippets complete guide
Search Engine Optimization (SEO)
A Beginner’s Guide To Google Featured Snippets

Did you know that Google already has the answer to your customer’s question? You’re probably thinking that you can outrank Google because it’s something they don’t have, but I would think again. Why? Because the answer is staring right at you in the search results. More and more websites are

Read More »
Subscribe to our newsletter
Chat With Our SEO community members On discord
Discord SEO Community Chat
  • Just-iko avatar Just-iko Thank you very much for answering ☑️ ✨
  • ddev66 avatar ddev66 Put your content in the right HTML tags and Google will show it this way.

    In the picture that you show, the first content is put in a list with bold headings.
    The second content is a FAQ on that page.

    Put in the right HTML tags and Google will pick it up nicely.
  • Just-iko avatar Just-iko Hello, I'm a newbie in this field, any guidance would be appreciated :) some questions please, is there any idea on how to make our website could appears like that in Google search? The one that I marked..
  • ddev66 avatar ddev66 Semrush or Ahrefs will help you for spying competitors.

    I think Semrush has a trial period as well.
  • Aadhi avatar Aadhi Buy semrush, you can buy it at cheap rate by using Group buy method
  • SG.CK avatar SG.CK Any free tool for spy traffic and ranking ?
  • ddev66 avatar ddev66 Search on google “htaccess redirect rules”
    Put them in your website’s htaccess file if you are using Apache
  • BrunoAfonso avatar BrunoAfonso how should I go to solve this issue
  • BrunoAfonso avatar BrunoAfonso Can you explain a little bit more? My website is not wordpress, I use amazon web services
  • ddev66 avatar ddev66 You can make a 301 redirect to the correct page on your website.
    If you are using Wordpress then SEO plugins like rank math have this feature.
    If you don’t want to use SEO plugins then there are many good redirect plugins in the Wordpress repository.
    And if you are not using Wordpress then .htaccess file is your friend.
  • BrunoAfonso avatar BrunoAfonso For example, is this image, the second link "THU Main Event" goes to a different page that it's supposed to. How do I fix this.
  • BrunoAfonso avatar BrunoAfonso So I have a website and when you search for it, one of the hyperlinks that google provides goes to the wrong page, is there a specific way for me to change that?
  • ddev66 avatar ddev66 Need more explanation
  • BrunoAfonso avatar BrunoAfonso Hello people, does anyone know how to fix a hyperlink within a google search?
  • ddev66 avatar ddev66 Semrush shows you all the links that it considers as toxic in its domain overview dashboard. You can then use these website list to disavow in GSC.
  • rrakesharmaa avatar rrakesharmaa I want to remove high spam backlinks via Disavow tool. So i need these links.
  • ddev66 avatar ddev66 extract high spam score backlinks.
    This is little confusing for me to understand

    Do you want to remove high spam backlinks to your website or do you want to receive backlinks from websites that have a high spam score?
  • yaswanth avatar yaswanth Now I use the Search console live URL inspector. It shows the page source and screenshot with an error(If any).
    Result: The page is not mobile friendly in the screenshot. All the element's styles are broken.

    Now, I feel like, " What the hell is happening in rich result tester? The google bot shows everything is ok, and in the search console, this is happening."

    # Problem Digging Stage final stage - Solving the problem
    The easiest way to solve the problem is to compare the thing and find the difference.
    Is rich results tester a google bot? Yes!
    Is it owned by google? Yes!
    Is it have any link with the official search console crawler? No!

    Now, What is the difference between 2 crawlers?
    Their IPs are different. They work differently.

    Summary: Google bot (Offical bot) is not able to crawl all elements in the webpage. It is not able to read all styling files. All other bots(services that use crawl as Google Bot) can view/crawl the page.

    List of official google bot IPs:

    Solution: Rather than digging into all files, we changed the hosting server located in the exact location.

    Thank you for reading this article. It takes a few mins to read this article, but It took hours to find the correct problem with a solution. If you find this article valuable, give it a like and if you have any questions, feel free to ask them.
  • yaswanth avatar yaswanth Solving Critical Indexing Problem (CASE STUDY)

    Last week I received a message from a friend he is requesting me to help him index a page of his website. I said, " Wait, sometime google will index automatically" Then he said he was getting problem with his homepage. So, I started digging. First, I want to find the problem. Then all other things were easy.

    # Problem Digging Stage 1 - Analyze the top layers
    Checking the basic things
    1) No Index tags
    2) Canonical tags
    3) Website page Age

    Result: Nothing Found

    # Problem Digging Stage 2 - Getting Deeper
    1) Checking status codes (If there is any redirects, 404 error, or soft 404 errors)
    2) Using an SEO browser to check the web page accessibility
    3) Trying with different user agents

    Result: Nothing Found

    # Problem Digging Stage 3 - Analyzing and
    comparing past and current stages of webpage
    1) Checking the Wayback machine for any spam content history
    2) Checking the search console for errors
    3) Other page's indexability

    Result: I got some clue. Search console shows "Page is not mobile friendly."

    # Problem Digging Stage 4 -Finding the reason for the search console error.
    When I checked the web page with SEO Browser, the page was mobile friendly, and I also tried "crawl as Googlebot." Everything looks good. Then where is the problem?

    One thing was confirmed google is not able to view the webpage clearly. And all other bots are not getting any problems.

    So, I decided to use only google properties in the further process (Because only the google bot gets stuck).
    I selected three tools to process further.
    1) Google page speed insights
    2) Google rich results tester
    3) Search console Live URL inspector

    First, I used page speed insights to check If the google bot can crawl/view the page or not(If there are any issues in crawling, then the tool returns a lighthouse error)
    Result: everything is ok

    Second I used Google rich results tester. It provides the page source and screenshot of the webpage.
    Result: everything is ok
  • achann avatar achann Backlink actually link that provided outside web, so if you use instagram and insert your web link that still counted as backlink.
  • achann avatar achann If you want to be free, why not using mailchimp for email blast. Or maybe you can use whatsender for whatsapp blast, there is nulled version I think.
  • achann avatar achann Um.. Maybe you can use whatsapp blast and give link? Or maybe you can use email marketing and give link to your web?
  • rrakesharmaa avatar rrakesharmaa How can I extract high spam score backlinks for my website? Is there any free tool that provides all high spam score sites HELP ME PLEASE 🙂
  • nkap avatar nkap <@211319858258771968> hey, would you be able to share the website that you want guest posts on? I’m in touch with a few fintech businesses and can ask them whether they’d be interested in putting a post on your site.
  • ddev66 avatar ddev66 <@211319858258771968> it sure will work. Make sure to write that it’s free to post as guests. A lot of websites do not mention this and writers usually think it’s paid opportunity only.

    Keep us updated of how well this goes for your website.
  • soutaraku avatar soutaraku Thank you so much for the detailed guide. I'll see if I can put up the Guest Post page to start with! I hope my email gets bombarded in a good way haha
  • ddev66 avatar ddev66 You should start putting up a page called Guest Posting on your other website where you put articles, etc.. and put all the requirements there which you are looking for in the guest posts. Make sure to leave your email as well for easier contacts.

    Build up some links to this page. Because most of the writers are looking to write for high metrics website that have good DA, TF, etc...

    Once you have a page setup it will help you get attention from people who are searching on Google.

    Next you can start sending the URL of this page to people whom you think might be interested to write for your service on social networks like twitter, linkedin, etc.

    Also list this page URL on websites that have posts like free guest posts list in SaaS, free guest posts list in "your niche", etc. Something like this:

    These will get you enough traction to attract guest posts from various contributors over the time. Your email will be bombarded with emails following the above tips.
  • soutaraku avatar soutaraku I can translate guest post to Japanese and put it on our website to share stories from overseas. I thought it would be interesting for our readers and a good way for link building.
  • soutaraku avatar soutaraku It's not titled as contribute/guest posts page, but there's a website we put interview articles and such. We surely can put guest posts on that website.
  • ddev66 avatar ddev66 <@211319858258771968> does your website have contribute/guest posts page?
  • soutaraku avatar soutaraku Hi guys! I'm a Japanese SEO specialist/ content editor working for a fintech company, and looking for someone to put guest posts on our website (preferably about fintech or SaaS market). Are there any good place to look for people willing to guest post?

    In Japan, not many people write guest posts, so I'm kinda lost. Twitter trick is only guiding light to me, <@838326478924021760>. Thanks for sharing.
  • Deleted User avatar Deleted User trying it out right now
  • nkap avatar nkap Great idea! Will definitely try it out. Thanks mate.
  • ddev66 avatar ddev66 A good trick to get guest posts for your website. <@456226577798135808> <@755307075625549854>
  • Büşra avatar Büşra Thank you very much. I'll try 😊
  • nkap avatar nkap Yeah me too!!
  • naaz avatar naaz <@755307075625549854> Thank you for the detailed answer. Hope <@341197404302737408> finds the right solution for this.
  • nkap avatar nkap <@341197404302737408> Just these:

    You can try 3 things: (I suggest you try the 3rd option first)

    1. If there are any links in your coverage report that’s actually not from your domain/property, I’d recommend you use the Search Console’s removal tool to remove these from your property.

    2. If you’re using any page builders like elementor etc make sure you turn off search engine indexing for things like templates. You can find this in Yoast SEO settings. With this setting your templates and unnecessary pages won’t be indexed. Are you using elementor by any chance?

    3. It’s also possible that your site has been hacked. If random URLs are appearing in analytics and search console the first thing that you should do is check your .htaccess file to see if someone has put any rewrite rules.
  • ddev66 avatar ddev66 <@755307075625549854> got any views on this?
  • ddev66 avatar ddev66 did you change your permalinks sometime back in last few months?
  • naaz avatar naaz <@838326478924021760> bringing to your attention on this.
  • Büşra avatar Büşra hello guys! I need to help about SEO optimation. I'm using wordpress Yoast. I saw dummy link like as `````` I haven't these in page. Btw ı'm using google search console. Why may be this? Is anyone has idea about that?
  • ankit662003 avatar ankit662003 does anyone know how to create seo silos?
  • ankit662003 avatar ankit662003 hi
  • ddev66 avatar ddev66 Just know that we are all here to help each other
  • ddev66 avatar ddev66 No worries mate.
  • Alex25 avatar Alex25 The thing is idk what to ask .
    I'm just stuck
  • ddev66 avatar ddev66 Drop your queries here

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.