Hi Trisquelmedia SL,
For total downloads of the sum of all packages, you can use this the below code,
<?php _e( "Total Downloads" , "download-manager" ); ?>
<?php echo $wpdb->get_var("select sum(meta_value) from {$wpdb->prefix}postmeta where meta_key='__wpdm_download_count'"); ?>
And for a certain user, please use this code snippet in your theme functions.php
add_shortcode('UserTotal', 'TotalUserDownload');
function TotalUserDownload() {
global $wpdb, $current_user;
$var = "Total Downloads: ";
$var .= number_format($wpdb->get_var("select count(*) from {$wpdb->prefix}ahm_download_stats where uid = '{$current_user->ID}'"),0,'.',',');
return $var;
}
Use the shortcode [UserTotal]
I hope it will work fine for you now
Thank you and regards