Automatically shows the updated date after post content.
function dr_display_last_updated_date( $content ) {
if ( is_single() ) {
$updated_date = get_the_modified_date( 'F j, Y' );
$content .= '<p class="post-updated">';
$content .= 'Last Updated: ' . esc_html( $updated_date );
$content .= '</p>';
}
return $content;
}
add_filter( 'the_content', 'dr_display_last_updated_date' );