How to show the last updated date on WordPress posts
In a block theme, show the last updated date by adding a Date block to the single post template and setting it to display the modified date. In a classic theme, print get_the_modified_date() in the post template. WordPress stores the modified date automatically each time a post is updated.
Readers judging a guide on software, prices or regulations want to know how current it is. A visible update date answers that, and it gives search engines a date on the page that agrees with the one in your structured data.
Step by step
1. Decide which dates to show
You have three sensible layouts: the published date only, the updated date only, or both ("Published 4 March 2025, updated 12 November 2026"). For news, keep the published date prominent. For evergreen guides that you revise, the updated date is the one readers care about. Showing both is the most transparent.
2. Block theme: use the Date block
- Go to Appearance → Editor → Templates and open the template used for single posts.
- Select the existing Date block near the title, or insert a new one.
- In the block's settings, choose the option to display the last modified date. Recent WordPress versions also offer a modified-date variation of the block to insert directly.
- Add a short label before it with a Paragraph or a Row block, such as "Updated".
- Save the template.
WordPress shows the modified date in this block only when the post was modified after it was published. A post that has never been revised shows nothing there, which avoids "Updated" labels on untouched posts.
3. Classic theme: edit the post template
In a child theme, open the template part that prints post meta (often template-parts/content-single.php or single.php) and add:
<?php if ( get_the_modified_time( 'U' ) > get_the_time( 'U' ) + DAY_IN_SECONDS ) : ?>
<p class="post-updated">
Updated <time datetime="<?php echo esc_attr( get_the_modified_date( 'c' ) ); ?>">
<?php echo esc_html( get_the_modified_date() ); ?>
</time>
</p>
<?php endif; ?>
The condition shows the line only when the post was modified at least a day after publishing, so fixing a typo an hour after you publish does not add an "Updated" line. get_the_modified_date() with no argument uses the date format from Settings → General.
4. Use a machine-readable time element
Wrap the date in a <time> element with a datetime attribute in ISO 8601 format, as the snippet above does with the c format. Browsers, search engines and assistive tools can then read the date unambiguously, whatever format you display to readers.
5. Make the schema agree
Article structured data has two date properties, datePublished and dateModified. With Hydrogen SEO, Article schema is filled from the post's own dates, through the %date% and %modified% variables, so it follows what WordPress stores with no extra step. Check a post with the Rich Results Test or by viewing the JSON-LD in the source: dateModified should match the visible "Updated" date, to the day.
6. Verify on a revised and an unrevised post
Open a post you have updated and confirm the line appears with the right date. Open one you have never edited since publishing and confirm it shows only the published date. Purge the page cache first, since cached pages keep the old markup.
7. Update dates only for real updates
WordPress changes the modified date on every save, including one-word fixes. That is technically true but not useful to readers. Adopt a rule for your team: the visible "Updated" date is for substantive changes, such as new information, corrected facts or revised recommendations. If a trivial edit must not move the date, some editors keep a manual "last reviewed" custom field for display instead of the automatic value.
What Google says about dates
Google's guidance on byline dates asks for a visible date that is clearly labelled as published or updated, consistent structured data, and no artificial freshening: changing the date without significantly changing the content is specifically discouraged. Google also says it may not show a date at all when it is unsure which one is right. One clear date pair, in agreement everywhere, is the way to avoid that.
Should you remove dates instead
Some sites hide dates so old posts do not look old. That hides a problem instead of fixing it, and it removes a signal readers use to trust the page. A better plan is to review dated posts on a schedule and update the ones worth keeping; see refresh old posts for SEO. Then the updated date works in your favour.
Common questions
Does WordPress track when a post was last updated?
Yes. Every post has a modified date that WordPress sets on each save. Themes simply choose whether to display it.
Should I show the published date or the updated date?
For evergreen content that you maintain, show the updated date, ideally alongside the original. For news, the published date should stay prominent.
Does changing the date improve rankings?
Not by itself. Google discourages changing dates without substantial changes to the content. A real update, with the date to match, is what helps.