In some cases, you may wish to show the date your post was last updated instead of the published date.
We can do this with a little CSS:
.posted-on .updated {
display: inline-block;
}
.posted-on .updated + .entry-date {
display: none;
}
If you wish to display some text before the date, you can do this:
.posted-on .updated:before {
content: "Last Updated ";
}
Show the 「Updated」 Post Date in Header Element
To show the updated post date in Header Element, add the PHP snippet below to create the shortcode:
function post_modified_date() {
return get_the_modified_date();
}
add_shortcode( 'modified_date', 'post_modified_date' );
Then add [modified_date] to the Header Element content.