How to Show the Updated Date in WordPress Themes (Including Official Themes)
When you refresh an old article, readers and search engines should know it’s up to date. Showing the updated date on your WordPress posts tells visitors the information is current, and the matching structured data tells Google when the page last changed. Many themes, including WordPress’s official default themes, only show the original published date. Here’s how to show the updated date in WordPress in 2026, with a theme setting, an SEO plugin or a few lines of code, plus what we did in the Twenty Fourteen theme.
Quick answer: Check your theme’s settings first (Kadence, Astra and GeneratePress have a “last updated” option). Otherwise, use get_the_modified_date() in your child theme to print “Updated on [date]” near the post title. For Google, make sure your Article structured data includes dateModified; SEO plugins like Rank Math and Yoast add it automatically.
Table of Contents
Why the updated date matters
- Readers trust fresh content. A 2014 date on a tutorial makes people assume it’s out of date, even if you rewrote it last week.
- Google uses date signals. Google recommends showing a clear visible date and providing
datePublishedanddateModifiedin structured data. Its guidance on publication dates (external site) explains how it picks the date shown in search results. - Be honest. Only change the updated date when you make meaningful changes. Google warns against faking freshness.
The structured data errors that started this
When Google Webmaster Tools (now Search Console) launched its structured data report, it showed thousands of errors on every post and page on our site:

They were caused by a missing updated class in the theme’s hAtom (hentry) microformat markup, where entry-title and updated were the two required fields:

Search Console no longer reports hAtom errors, and Google relies on JSON-LD structured data instead, but the lesson stands: give each post a clear, machine-readable updated date.
Method 1: Use your theme or SEO plugin
- Theme settings: in Kadence, go to Customizer > Posts/Pages Layout > Single Post Layout > Post Meta and turn on the last updated date. Astra and GeneratePress have similar options.
- SEO plugins: Rank Math and Yoast add
dateModifiedto the Article schema automatically, and can show the updated date in search snippets settings.
Check the result with Google’s Rich Results Test (external site) or the Schema Markup Validator (external site), which replaced the old Structured Data Testing Tool.
Method 2: Add the updated date with code (any theme)
Add this to your child theme’s functions.php to show “Updated on” above post content whenever a post has been modified after publishing:
add_filter( 'the_content', function ( $content ) {
if ( is_single() && in_the_loop() && is_main_query()
&& get_the_modified_time( 'U' ) > get_the_time( 'U' ) + DAY_IN_SECONDS ) {
$updated = sprintf(
'<p class="updated-date">Updated on <time class="updated" datetime="%1$s">%2$s</time></p>',
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
$content = $updated . $content;
}
return $content;
} );It shows the date only if the post was updated at least a day after publishing, so minor same-day fixes don’t trigger it. We covered more ways to add last modified date markup to WordPress in an earlier post.
Method 3: Twenty Fourteen (and other official themes)
In Twenty Fourteen, the date comes from the twentyfourteen_posted_on() function in inc/template-tags.php. It’s wrapped in if ( ! function_exists() ), so you can override it by defining a function with the same name in your child theme’s functions.php. We copied it and made three changes:
- Replaced
get_the_date()withget_the_modified_date(), so the updated date is shown. - Added the
updatedclass to the date, which fixed the structured data errors. - Added the word Updated before the date, so readers know it isn’t the original publish date. You don’t want people finding five-year-old comments on a post that looks a month old.
The key line in our version looked like this:
printf( 'Updated <span class="entry-date updated"><a href="%1$s" rel="bookmark"><time class="entry-date updated" datetime="%2$s">%3$s</time></a></span> ...',
esc_url( get_permalink() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() ),
... );The same approach works in other official themes such as Twenty Fifteen through Twenty Seventeen, which use similar _posted_on functions. In block themes like Twenty Twenty-Five, edit the Single Posts template in the Site Editor and set the Date block to show the modified date. (Using Twenty Fourteen? You may also want to remove its Lato font for speed.)
Frequently asked questions
Should I show the published date, the updated date, or both?
Both is clearest: “Published 2014, updated October 2026”. If you show only one, show the updated date, clearly labelled.
Does showing the updated date improve rankings?
Not by itself. Genuinely improving the content is what helps; the date simply tells readers and Google that it’s current.
Will this change my post URLs?
No. Showing the modified date doesn’t change the publish date or permalinks.
Stuck on a gift? Try our free Gift Idea GeneratorIdeas for anyone by age, job, interests and budget, with Amazon.com and Amazon.in linksFind gifts →Get our free weekly email: new tech guides and tools, no spam.
New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.
One email a week. Unsubscribe anytime. See our privacy policy.







Hi, this works great. However I would like the original date of publication to be visible for my readers as well. How can I combine it with your code?
Nico
worked fine!
It works!!
For hebrew just replace the first updated with עודכן
printf( ‘עודכן %3$s %5$s‘,esc_url( get_permalink() ),
esc_attr( get_the_modified_date( ‘c’ ) ),
esc_html( get_the_modified_date() ),
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
get_the_author()
Nice! Since search engines want us to be updating our content as much as possible then the date issue on posts really makes sense. I have surely liked your article.
For sure I will do improvement the way I used to do commenting. Helped me lot to upgrade my knowledge.
As long as you take the time read the blog post and have an opinion that you want to share, you just go for it. No special rules needed.
just checking, Chandra. After i implemented it on my child theme, how do i know it is working for me? the Structural Tool will for the next few days, still show errors? i managed to resolve the authorship issue. now it is left with this.
Please help :)
The updated date will appear in the Google search results.
Hi P.Chandra
Thanks for this really nice tip and the code
I’m looking for a plugin that can automatically insert contextual links in my blog post to the relevant posts on my other wordpress blogs, I’ve been tired of finding such a plugin, landed up here while searching some blah blah on Google,
Please let me know if there is any such plugin/solution
Thanks
Dates are important and so is regular content. I write blogs everyday and make sure it shows the date on each.
I tried this code, but the lines of the code are somehow displayed over the navigation bar of the site.
Nice! Since search engines want us to be updating our content as much as possible then the date issue on posts really makes sense. I have surely liked your article.
Great ideas.
Hi,
Thanks for sharing this post, i was looking for such a post to understand how to update dates & time in wordpress…
This article is very useful. I am searching this type of post. Thanks for the info.
Nice! Since search engines want us to be updating our content as much as possible then the date issue on posts really makes sense. I have surely liked your article.
Great ideas.
This is terrific. i was really puzzled about updating the dates of the posts but was unable to sort out. thanks. would try out now.
Why not just use Isn’t it a lot easier as a built in function where you can change the display type in Settings > General ??
suggest me if i am wrong.
-Shital
This article is about adding the updated date. The settings advise date format and themes usually print published dates.
Great idea. Would love an update date on some blog posts without removing the original post date. Haha … too complicated for me … I wait until it comes out of the box to WordPress …
Hi,
I was not aware you can update the date in WordPress. Thanks for sharing this cool post. I look forward in doing the change myself.
Nice thing but we need to be very careful while doing it as any manual error can lead to a catastrophe.
Nice article, used it to create this function for the twentytwelve theme (add it to functions.php in the child theme):
function twentytwelve_entry_meta() {
// Translators: used between list items, there is a space after the comma.
$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
// Translators: used between list items, there is a space after the comma.
$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
$is_updated_post = (get_the_modified_date( 'U' ) > get_the_date( 'U' ));
if ( $is_updated_post ) {
$date = sprintf( '%4$s',
esc_url( get_permalink() ),
esc_attr( get_the_modified_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
} else {
$date = sprintf( '%4$s',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
}
$author = sprintf( '%3$s',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),
get_the_author()
);
// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
if ( $tag_list ) {
if ($is_updated_post) {
$utility_text = __( 'This entry in %1$s and tagged %2$s was updated on %3$s by %4$s.', 'twentytwelve' );
} else {
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'twentytwelve' );
}
} elseif ( $categories_list ) {
if ($is_updated_post) {
$utility_text = __( 'This entry in %1$s was updated on %3$s by %4$s.', 'twentytwelve' );
} else {
$utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'twentytwelve' );
}
} else {
if ($is_updated_post) {
$utility_text = __( 'This entry was updated on %3$s by %4$s.', 'twentytwelve' );
} else {
$utility_text = __( 'This entry was posted on %3$s by %4$s.', 'twentytwelve' );
}
}
printf(
$utility_text,
$categories_list,
$tag_list,
$date,
$author
);
}
I have hardly any idea of how to do this. I’m using thesis theme, so if I copy/past this code into the functions.php it will work?
Yes this should work.
My website has zero hatom markups, I think there were some markups of this kind.