Docs / Shortcodes / [wpdm_trending] – Trending Downloads

[wpdm_trending] – Trending Downloads

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

ParameterTypeDefaultDescription
daysinteger7Number of days to look back for download statistics.
limitinteger5Maximum number of packages to display.
min_downloadsinteger1Minimum downloads required to qualify as trending.
cache_minutesinteger30How long to cache results (in minutes).

Display Options

ParameterTypeDefaultDescription
templatestringlink-template-default.phpLink template to use for displaying packages.
colsinteger3Number of grid columns on desktop.
colspadinteger2Number of grid columns on tablet.
colsphoneinteger1Number of grid columns on mobile.
headingstring""Section heading text (displays with 🔥 emoji).
show_badgeinteger1Show ranking badge (#1, #2, etc.). Set to 0 to hide.
show_countinteger1Show download count for the period. Set to 0 to hide.

Filtering

ParameterTypeDefaultDescription
categoriesstring""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

  1. Queries the ahm_download_stats table for recent downloads
  2. Groups by package and counts downloads within the time period
  3. Ranks packages by download count
  4. 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_downloads on high-traffic sites to filter noise
  • Adjust cache_minutes based on your update frequency needs
  • Pair with [wpdm_packages] showing “newest” for a balanced content mix

Related

Last updated on January 26, 2026

Need Help?

Get support from our team or community forum.

Visit Support

Customization

Need custom features? We can help.

Request Quote