# "Last Updated" Date and Version on Downloads

> Shows when a download was last updated and an optional version number above its content, reassuring buyers that the product is maintained.

- Type: PHP
- Runs: Run everywhere
- Category: [Easy Digital Downloads](https://wpide.com/library/category/edd/)
- Requires: Easy Digital Downloads
- Tags: edd, downloads, versions, trust
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/edd-download-last-updated/

## Code

```php
add_action( 'add_meta_boxes_download', function () {
    add_meta_box( 'wpide-edd-version', 'Version', function ( $post ) {
        wp_nonce_field( 'wpide_edd_version', 'wpide_edd_version_nonce' );
        printf( '<label class="screen-reader-text" for="wpide-edd-version-field">%1$s</label><input type="text" id="wpide-edd-version-field" name="wpide_edd_version" value="%2$s" placeholder="1.0.0" style="width:100%%">', esc_html( 'Version' ), esc_attr( get_post_meta( $post->ID, '_wpide_edd_version', true ) ) );
    }, 'download', 'side' );
} );

add_action( 'save_post_download', function ( $post_id ) {
    if ( ! isset( $_POST['wpide_edd_version_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['wpide_edd_version_nonce'] ), 'wpide_edd_version' ) || ! current_user_can( 'edit_post', $post_id ) || wp_is_post_autosave( $post_id ) ) {
        return;
    }

    update_post_meta( $post_id, '_wpide_edd_version', sanitize_text_field( wp_unslash( $_POST['wpide_edd_version'] ?? '' ) ) );
} );

add_action( 'edd_before_download_content', function ( $download_id ) {
    $version = get_post_meta( $download_id, '_wpide_edd_version', true );
    $parts   = array( sprintf( 'Last updated: %s', get_the_modified_date( '', $download_id ) ) );

    if ( $version ) {
        $parts[] = sprintf( 'Version %s', $version );
    }

    printf( '<p class="wpide-edd-updated" style="font-size:.9em;opacity:.8">%s</p>', esc_html( implode( ' · ', $parts ) ) );
} );
```

## Notes

Enter a version in the "Version" box on the download edit screen; the date comes from the last time you saved the download.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Last Updated" Date and Version on Downloads" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
