Templates

Link Templates

4 min read Updated Jan 30, 2026

Overview

Link templates control how download packages appear when embedded in pages using shortcodes. They define the button style, layout, and information displayed alongside the download link. WPDM includes 25 built-in link templates.

Prerequisites

  • WordPress Download Manager installed
  • At least one published package
  • Understanding of shortcodes

Template Selection Priority

When displaying a package, WPDM determines which link template to use in this priority order:

  1. Shortcode Parameter – Template specified in the shortcode (highest priority)
  2. Package Setting – Template selected in the package edit screen
  3. Global Default – Default template set in plugin settings (lowest priority)

Available Link Templates

Template NameDescription
audioWith Audio Preview – displays audio player for audio files
bsthumnailList Group – Bootstrap-style list group layout
buttonButton Only – minimal download button
button-popupButton with Popup – download button that opens in popup
calltoaction1Call to Action 1 – CTA style with prominent button
calltoaction2Call to Action 2 – Alternative CTA layout
calltoaction3Call to Action 3 – Third CTA variation
calltoaction4Call to Action 4 – Fourth CTA variation
cardCard Vertical – Bootstrap card with image on top
cardhCard Horizontal – Bootstrap card with side-by-side layout
category-linkCategory Link – for category listing pages
defaultDefault Template – icon, title, file info, and download button
default-extDefault Extended – default template with additional details
default-iconDefault with Icon – default template emphasizing file icon
default-wdcDefault with Download Count – shows download statistics
extended3-Column Detailed – thumbnail, description, and stats in columns
glassGlassmorphism Card – modern glass-effect card design
msthumnailMetro Style – Windows Metro-inspired tile design
nopopupEmbedded (No Popup) – inline display without modal
panelPanel – Bootstrap panel-style container
panel-1-3Panel 1/3 Width – compact panel for grid layouts
search-resultSearch Result – optimized for search results display
semi-ext1-Column Extended – single column with details
spotlightSpotlight Hero – large hero-style showcase
widgetWidget – compact template for sidebar widgets

Using Link Templates

Method 1: Shortcode Parameter (Highest Priority)

Specify the template directly in the shortcode:

[wpdm_package id="123" template="card"]
[wpdm_package id="123" template="spotlight"]

Method 2: Per-Package Setting

Set a specific template for individual packages:

  1. Edit the package in Downloads > All Files
  2. Go to Package Settings tab
  3. Find the Link Template dropdown
  4. Select your preferred template
  5. Save/Update the package

This template will be used whenever this package is displayed (unless overridden by shortcode).

Method 3: Global Default Setting

Set a default template for all packages using the WPDM Default Values add-on:

  1. Go to Downloads > Settings > Default Values
  2. Find the Link Template option
  3. Select your preferred default template
  4. Save changes

This default will apply to all packages that do not have a specific template set.

Template Examples

button

The simplest template – just a download button:

[wpdm_package id="123" template="button"]

Best for: Inline download links, minimal space requirements

default

Balanced template with icon, title, file info, and button:

[wpdm_package id="123" template="default"]

Best for: General purpose, file listings

card

Visual card with featured image:

[wpdm_package id="123" template="card"]

Best for: Product showcases, visual galleries

extended

Detailed 3-column layout with all information:

[wpdm_package id="123" template="extended"]

Best for: Software downloads, detailed file pages

spotlight

Large hero-style presentation:

[wpdm_package id="123" template="spotlight"]

Best for: Featured downloads, landing pages

glass

Modern glassmorphism design:

[wpdm_package id="123" template="glass"]

Best for: Modern themes, visual impact

Template Files Location

Built-in templates are located at:

/wp-content/plugins/download-manager/src/Package/views/link-templates/

Theme overrides can be placed at:

/wp-content/themes/your-theme/download-manager/link-templates/

Template Tags

Each template can use these placeholder tags:

TagDescription
[title]Package name
[page_link]Linked package name
[page_url]Package page URL
[icon]Package icon
[thumb]Featured image thumbnail
[excerpt]Short description
[excerpt_100]First 100 characters of description
[version]Version number
[file_size]Total file size
[file_count]Number of files
[download_count]Download count
[download_link]Download button/link
[update_date]Last update date

CSS Customization

Each template has wrapper classes for styling:

/* Style the card template */
.wpdm-link-template-card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Style download buttons globally */
.wpdm-download-link {
    background: #4f46e5;
    color: white;
}

Troubleshooting

Template Not Applying

Check the priority order:

  1. Is there a template parameter in your shortcode?
  2. Does the package have a template set in Package Settings?
  3. Is there a global default set?

Template Not Found

  • Verify the template name is spelled correctly (no .php extension needed)
  • Check that the template file exists in the link-templates directory
  • Clear any caching plugins

Styling Issues

  • Inspect elements with browser developer tools
  • Add more specific CSS selectors
  • Check for theme CSS conflicts