Preview:
// Adds a new sortable "last updated" column to posts and pages backend.
function custom_columns($defaults) {
    $defaults['last_updated'] = __('Last Updated', 'your-textdomain');
    return $defaults;
}
add_filter('manage_posts_columns', 'custom_columns');
add_filter('manage_pages_columns', 'custom_columns');

function custom_columns_content($column_name, $post_id) {
    if ($column_name == 'last_updated') {
        $last_updated = get_the_modified_date();
        echo $last_updated;
    }
}
add_action('manage_posts_custom_column', 'custom_columns_content', 10, 2);
add_action('manage_pages_custom_column', 'custom_columns_content', 10, 2);

function custom_columns_sortable($columns) {
    $columns['last_updated'] = 'last_updated';
    return $columns;
}
add_filter('manage_edit-post_sortable_columns', 'custom_columns_sortable');
add_filter('manage_edit-page_sortable_columns', 'custom_columns_sortable');

function custom_columns_orderby($query) {
    if (!is_admin()) {
        return;
    }

    $orderby = $query->get('orderby');

    if ('last_updated' == $orderby) {
        $query->set('orderby', 'modified');
    }
}
add_action('pre_get_posts', 'custom_columns_orderby');
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter