Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

SEO & AI search · Guide

How to Show the Last Updated Date in WordPress

Short answer

To show the last updated date in WordPress, add the Modified Date block to your Single Post template in the Site Editor if you use a block theme, or add get_the_modified_date() to your theme files if you use a classic theme. The free WP Last Modified Info plugin does the same job with no code, and it adds dateModified schema markup too.

Key takeaways

  • The last updated date shows when a post was last edited, while the published date shows when it first went live.
  • In a block theme, add the Modified Date block to the Single Post template, or transform an existing Post Date block.
  • In a classic theme, get_the_modified_date() has returned the last modified date since WordPress 2.1.0.
  • WP Last Modified Info version 1.9.6 is free, tested with WordPress 6.9, and adds dateModified schema automatically.
  • Show the updated date only when the post really changed, and keep the published date visible too.
  • The date format comes from Settings > General, so set it before you start.

What does the last updated date show?

The last updated date shows when a post was most recently edited, while the published date shows when it first went live.

WordPress stores both dates for every post. Most themes show only the published date, so a post updated last week can still look three years old to a reader.

Showing the updated date tells readers the content is current. It matters most for posts you revise often, such as pricing guides, how-to articles, and news stories.

Should you show the published date, the updated date, or both?

Show both dates when a post has changed since it was published, and show only the published date when it has not.

Readers use the published date to judge how old a post is, and the updated date to judge whether it is still current. Showing both answers both questions at once.

For evergreen posts that rarely change, the published date alone is fine. For posts you update every few months, the updated date is the one readers look for first.

Pages work the same way as posts here, since WordPress stores a modified date for both. Our posts vs pages guide explains when to use each one.

How do you show the last updated date in a block theme?

Add the Modified Date block to your Single Post template in the Site Editor.

  1. In your dashboard, open Appearance > Editor to launch the Site Editor.
  2. Open Templates, then select Single Post.
  3. Click where the date should appear, usually near the post title or author info.
  4. Insert the Modified Date block and save the template.

If your template already has a Post Date block, you can transform it instead. WordPress.org's Post Date block docs say the block can be changed into a Modified Date block from the Transform button on the block toolbar (WordPress.org docs).

The Modified Date block stays blank on the front end when a post has never been edited after publication. That keeps unedited posts clean without any extra settings.

How do you show the last updated date in a classic theme with code?

Add one line of PHP to the template that outputs your posts, usually single.php.

WordPress provides a function for this job: get_the_modified_date() retrieves the date a post was last modified. It has been in WordPress since version 2.1.0, and its format defaults to the date format set in your site settings (WordPress Developer Resources).

Place this code inside The Loop, near the published date:

<?php echo esc_html( get_the_modified_date() ); ?>

Back up your site and use a child theme before you edit theme files, so a theme update does not wipe out your change. The matching function the_modified_time() prints the time a post was last modified, and its docs suggest comparing it with the published time to avoid showing the same date twice.

How do you show the last updated date with a plugin?

Install the free WP Last Modified Info plugin if you want the date shown with no code at all.

  1. Go to Plugins > Add New, search for “WP Last Modified Info”, then install and activate it.
  2. Go to Settings > WP Last Modified Info.
  3. Turn on the display options you want and save your changes.

The plugin inserts the last modified date above or below your posts and pages, and it works on custom post types too. It also adds dateModified schema markup, which tells search engines the last modified date of a page (WordPress.org).

Version 1.9.6 was released on 30 January 2026, is tested with WordPress 6.9, and holds a 4.9 out of 5 rating from 857 reviews. The plugin is compatible with WordPress 4.7 and later, and it also provides a shortcode, [lmt-post-modified-info], for placing the date by hand.

How do you show the updated date only when a post changed?

Compare the published date with the modified date, and print the updated date only when the two differ.

Jetpack's guide shows this pattern: store get_the_date() and get_the_modified_date() in two variables, check whether they are different, and only then print the “Last updated” line (Jetpack).

<?php
$published_date = get_the_date();
$modified_date = get_the_modified_date();
if ( $modified_date !== $published_date ) {
    echo 'Last updated: ' . $modified_date;
}
?>

The WP Last Modified Info plugin offers the same result without code. Its settings include a gap option, such as 1 day or 24 hours, that hides the modified date when it is too close to the published date.

GeneratePress docs show a shortcode version of the same idea, which you can place in a header element or a widget instead of editing a template (GeneratePress docs).

How does the last updated date help SEO?

A visible updated date helps search engines and readers see that a page is maintained.

The dateModified schema that the WP Last Modified Info plugin adds gives crawlers a machine-readable update time for each page. Our schema markup guide explains how to check that markup is present and valid.

A fresh date alone does not lift rankings. Google's own guidance warns against changing a date to make a page look fresh when the content has not really changed, so only show an updated date after a real edit.

That said, readers click and stay longer on pages that look current, and that behavior is what the date supports. Keep the published date visible too, so the update is honest.

Well-maintained pages also get cited more often. Our guide to writing content AI assistants cite explains what else those systems look for beyond a fresh date.

Which method should you pick?

Pick the method that matches your theme and your comfort with code.

MethodBest forCode neededSchema included
Modified Date blockBlock themesNoNo
get_the_modified_date()Classic themesYesNo
WP Last Modified InfoAny theme, no codeNoYes, dateModified
ShortcodeExact placementNoDepends on plugin

The block method is fastest for block themes, and the plugin method is fastest for everyone else. Use the code method only when you need exact control over the markup and you are comfortable editing theme files.

If your site mixes block and classic templates, the plugin covers both at once. It works on posts, pages, and custom post types, which the block method does not always do.

How do you check that it works?

Edit a post, change a sentence, and update it. Then open the post on the front end and look for the updated date.

Check two posts: one you have edited and one you have never touched. The edited post should show the updated date, and the untouched post should show only the published date or nothing at all.

If the date does not appear, check that you edited the template actually assigned to the post. Block themes can have several Single Post templates, and classic themes can use a custom single-post template instead of single.php.

If a post shows the wrong date after a scheduled update, the publish may have missed its slot. Our missed schedule fix guide covers the usual causes and the fix for each one.

What mistakes should you avoid?

The biggest mistake is changing the date without changing the content, which misleads readers and search engines.

  • Showing an updated date on a post you only fixed a typo in.
  • Replacing the published date entirely, so readers cannot tell how old the post is.
  • Editing your main theme files instead of a child theme, so an update erases the change.
  • Forgetting to check the date on pages as well as posts, since the two can use different templates.
  • Using a date format that confuses readers, such as numbers with no month name.

Set your date format in Settings > General before you start, so every date on your site uses the same style. A clear format such as “November 20, 2026” reads better than “11/20/2026” for most visitors.

Frequently asked questions

Should I change the updated date every time I edit a post?

No, unless the content really changed. Showing a new date after a tiny edit misleads readers, and search engines treat date-only changes as a warning sign. Update the content first, then let the date follow the edit.

Can I show the last updated date on pages too?

Yes. WordPress stores the modified date for pages as well as posts, and the WP Last Modified Info plugin displays it on both. In a block theme, add the Modified Date block to the Page template instead of the Single Post template.

Why is the Modified Date block blank on my post?

The block stays blank because the post has never been modified after publication. Edit the post and save it, then check again. If the block still shows nothing, confirm you edited the template assigned to that post.

Can I show both the published date and the updated date?

Yes, and it is a common choice. The published date shows when the post first appeared, and the updated date shows when it was last revised. Showing both is more honest than replacing one with the other.

How do I change the format of the updated date?

The plugin reads the date and time format from Settings > General, and it also lets you pick a custom format in its own settings. You can also show the date as a relative time, such as 3 days ago, if you prefer that style.

Does the WP Last Modified Info plugin work with my SEO plugin?

Yes. The plugin is compatible with WordPress 4.7 and later and states it is tested with Yoast SEO, Rank Math, All in One SEO, and SEOPress. If your SEO plugin already outputs dateModified schema, check for duplicates with a schema validator.

Sources

  1. get_the_modified_date() WordPress Developer Resources
  2. WP Last Modified Info WordPress.org
  3. Post Date block WordPress.org
  4. How to Display the Last Updated Date on WordPress Posts Jetpack
  5. Show the Updated Post Date GeneratePress

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test