Support » Plugins » [Plugin: WP-DownloadManager] Least downloads option?

Viewing 2 replies - 1 through 2 (of 2 total)
  • And, now that I think about it, a RANDOM downloads selection in the widget would also be great!

    Didn’t test this but in wp-downloadmanger.php you could try copying the function get_most_downloaded to a function called get_least_downloaded, then change this:

    $files = $wpdb->get_results("SELECT * FROM $wpdb->downloads WHERE file_permission != -2 ORDER BY file_hits DESC LIMIT $limit");

    to this:

    $files = $wpdb->get_results("SELECT * FROM $wpdb->downloads WHERE file_permission != -2 ORDER BY file_hits ASC LIMIT $limit");

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP-DownloadManager] Least downloads option?’ is closed to new replies.