Link Templates
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:
- Shortcode Parameter – Template specified in the shortcode (highest priority)
- Package Setting – Template selected in the package edit screen
- Global Default – Default template set in plugin settings (lowest priority)
Available Link Templates
| Template Name | Description |
|---|---|
audio | With Audio Preview – displays audio player for audio files |
bsthumnail | List Group – Bootstrap-style list group layout |
button | Button Only – minimal download button |
button-popup | Button with Popup – download button that opens in popup |
calltoaction1 | Call to Action 1 – CTA style with prominent button |
calltoaction2 | Call to Action 2 – Alternative CTA layout |
calltoaction3 | Call to Action 3 – Third CTA variation |
calltoaction4 | Call to Action 4 – Fourth CTA variation |
card | Card Vertical – Bootstrap card with image on top |
cardh | Card Horizontal – Bootstrap card with side-by-side layout |
category-link | Category Link – for category listing pages |
default | Default Template – icon, title, file info, and download button |
default-ext | Default Extended – default template with additional details |
default-icon | Default with Icon – default template emphasizing file icon |
default-wdc | Default with Download Count – shows download statistics |
extended | 3-Column Detailed – thumbnail, description, and stats in columns |
glass | Glassmorphism Card – modern glass-effect card design |
msthumnail | Metro Style – Windows Metro-inspired tile design |
nopopup | Embedded (No Popup) – inline display without modal |
panel | Panel – Bootstrap panel-style container |
panel-1-3 | Panel 1/3 Width – compact panel for grid layouts |
search-result | Search Result – optimized for search results display |
semi-ext | 1-Column Extended – single column with details |
spotlight | Spotlight Hero – large hero-style showcase |
widget | Widget – 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:
- Edit the package in Downloads > All Files
- Go to Package Settings tab
- Find the Link Template dropdown
- Select your preferred template
- 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:
- Go to Downloads > Settings > Default Values
- Find the Link Template option
- Select your preferred default template
- 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:
| Tag | Description |
|---|---|
[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:
- Is there a
templateparameter in your shortcode? - Does the package have a template set in Package Settings?
- Is there a global default set?
Template Not Found
- Verify the template name is spelled correctly (no
.phpextension 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