Shortcodes

[wpdm_download_count] Shortcode

3 min read Updated Jan 26, 2026

Overview

The [wpdm_download_count] shortcode displays download statistics. It can show total downloads across all packages, downloads for a specific package, or downloads by category. Useful for displaying social proof and engagement metrics.

Prerequisites

  • WordPress Download Manager installed
  • Download tracking enabled
  • Packages with recorded downloads

Quick Start

Total downloads site-wide:

[wpdm_download_count]

Specific package downloads:

[wpdm_download_count id="123"]

Category downloads:

[wpdm_download_count category="software"]

Syntax

[wpdm_download_count parameter="value"]

Parameters

Parameter Type Default Description
id int Specific package ID
category string Category slug
format int 1 Format with commas (1=yes, 0=no)
label string Text to display before/after count
label_position string “after” “before” or “after”

Usage Examples

Total Site Downloads

Display total downloads across all packages:

[wpdm_download_count]

Output: 12,345

Specific Package

Show downloads for one package:

[wpdm_download_count id="123"]

Output: 2,456

Category Total

Total downloads in a category:

[wpdm_download_count category="software"]

Output: 8,901

With Label (After)

Add text after the number:

[wpdm_download_count label="downloads"]

Output: 12,345 downloads

With Label (Before)

Add text before the number:

[wpdm_download_count label="Total Downloads:" label_position="before"]

Output: Total Downloads: 12,345

Without Formatting

Raw number without commas:

[wpdm_download_count format="0"]

Output: 12345

Combined Parameters

Package with label:

[wpdm_download_count id="123" label="times" label_position="after"]

Output: 2,456 times

Common Use Cases

Homepage Stats

Display impressive download numbers:

[wpdm_download_count] Total Downloads

Package Display

Show downloads inline with package info:

Software Name

Downloaded [wpdm_download_count id="123"] times

Category Page

Show category popularity:

Software Downloads

Over [wpdm_download_count category="software"] downloads and counting!

Sidebar Widget

Simple download counter:

Download Stats

[wpdm_download_count] total downloads

Footer Stats

Site statistics in footer:


Styling

CSS for Count Display

/* Basic counter */
.wpdm-download-count {
    font-weight: 700;
    color: #4f46e5;
}

/* Large display */
.download-stat {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* With icon */
.download-counter::before {
    content: "📥 ";
}

/* Card style */
.stat-card {
    display: inline-block;
    padding: 24px 32px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.stat-card .number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

Animated Counter Effect

0


document.querySelectorAll('.animated-counter').forEach(counter => {
    const target = parseInt(counter.dataset.target);
    const duration = 2000;
    const step = target / (duration / 16);
    let current = 0;

    const timer = setInterval(() => {
        current += step;
        if (current >= target) {
            counter.textContent = target.toLocaleString();
            clearInterval(timer);
        } else {
            counter.textContent = Math.floor(current).toLocaleString();
        }
    }, 16);
});

Multiple Stats Dashboard

Create a statistics dashboard:

📥
[wpdm_download_count]
Total Downloads
📦
[wpdm_package_count]
Packages
💻
[wpdm_download_count category="software"]
Software Downloads
📄
[wpdm_download_count category="documents"]
Document Downloads

CSS:

.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 40px;
}

.stat-box {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

Related Shortcode

[wpdm_package_count]

Count total packages:

[wpdm_package_count]

With category:

[wpdm_package_count category="software"]

Data Source

The download count comes from:

  • __wpdm_download_count post meta for packages
  • wp_ahm_download_stats table for detailed tracking

Troubleshooting

Shows Zero

Causes:

  • No downloads recorded
  • Wrong package/category ID
  • Tracking disabled

Solutions:

  • Verify downloads are tracked
  • Check ID/slug is correct
  • Enable download tracking in settings

Count Seems Wrong

Cause: Cache or meta sync issue

Solution:

  • Clear caching
  • Recalculate counts in settings
  • Check download statistics page

Not Displaying

Cause: Shortcode not registered

Solution:

  • Verify WPDM is active
  • Check for plugin conflicts

Related Documentation

  • [[wpdm_package] Shortcode](/doc/shortcodes/wpdm-package/)
  • [[wpdm_trending] Shortcode](/doc/shortcodes/wpdm-trending/)
  • Download Statistics

Last updated: January 2026
Applies to: WordPress Download Manager 7.x