Display the most downloaded packages within a specified time period. Perfect for showcasing popular content and driving engagement with trending downloads.
Basic Syntax
[wpdm_trending]
This displays the top 5 trending downloads from the last 7 days.
Parameters
Time Range
| Parameter | Type | Default | Description |
|---|---|---|---|
days | integer | 7 | Number of days to look back for download statistics. |
limit | integer | 5 | Maximum number of packages to display. |
min_downloads | integer | 1 | Minimum downloads required to qualify as trending. |
cache_minutes | integer | 30 | How long to cache results (in minutes). |
Display Options
| Parameter | Type | Default | Description |
|---|---|---|---|
template | string | link-template-default.php | Link template to use for displaying packages. |
cols | integer | 3 | Number of grid columns on desktop. |
colspad | integer | 2 | Number of grid columns on tablet. |
colsphone | integer | 1 | Number of grid columns on mobile. |
heading | string | "" | Section heading text (displays with 🔥 emoji). |
show_badge | integer | 1 | Show ranking badge (#1, #2, etc.). Set to 0 to hide. |
show_count | integer | 1 | Show download count for the period. Set to 0 to hide. |
Filtering
| Parameter | Type | Default | Description |
|---|---|---|---|
categories | string | "" | Comma-separated category slugs to filter by. |
Usage Examples
Top 10 from Last 30 Days
[wpdm_trending days="30" limit="10"]
With Custom Heading
[wpdm_trending heading="🔥 Hot Downloads This Week"]
Filter by Category
[wpdm_trending categories="software,documents"]
4-Column Card Layout
[wpdm_trending template="link-template-card.php" cols="4"]
Clean Layout (No Badges)
[wpdm_trending show_badge="0" show_count="0"]
Minimum Threshold
Require at least 10 downloads to be considered trending:
[wpdm_trending min_downloads="10" days="14"]
Complete Example
[wpdm_trending
days="30"
limit="8"
cols="4"
colspad="2"
colsphone="1"
heading="Popular Downloads"
categories="software"
min_downloads="5"
cache_minutes="60"]
Visual Features
- Ranking Badges – Top 3 items get a golden “hot” badge; others get standard indigo
- Download Counts – Shows how many times each package was downloaded during the period
- Responsive Grid – Adapts to screen size with configurable columns
- Any Template – Works with all link templates (default, card, button, etc.)
How It Works
- Queries the
ahm_download_statstable for recent downloads - Groups by package and counts downloads within the time period
- Ranks packages by download count
- Caches results for performance (default 30 minutes)
Tips
- Use on your homepage to highlight popular content
- Combine with categories to show trending within specific topics
- Increase
min_downloadson high-traffic sites to filter noise - Adjust
cache_minutesbased on your update frequency needs - Pair with
[wpdm_packages]showing “newest” for a balanced content mix
Related
- [wpdm_packages] – Package listings with various sort options
- [wpdm_categories] – Display category grid
- Statistics Dashboard – View download analytics