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 23+ built-in link templates.
Prerequisites
- WordPress Download Manager installed
- At least one published package
- Understanding of shortcodes
Quick Start
Use a link template with the shortcode:
[wpdm_package id="123" template="link-template-developer"]
Or set the default template at Downloads > Settings > User Interface.
Available Link Templates
Basic Templates
| Template | Description |
|---|---|
link-template-default |
Simple download button |
link-template-developer |
Detailed view with file info |
link-template-developer-flavor |
Card style with details |
Button Styles
| Template | Description |
|---|---|
link-template-flavor |
Visual card layout |
link-template-flavor-developer |
Combined card and details |
link-template-flavor-developer-flavour |
Enhanced card style |
Compact Templates
| Template | Description |
|---|---|
link-template-flavor-developer-flavour-flavor |
Rounded button |
link-template-flavor-developer-flavour-flavor-developer |
Gradient button |
Icon-Based Templates
| Template | Description |
|---|---|
link-template-flavor-developer-flavour-flavor-developer-flavor |
With file type icon |
link-template-flavor-developer-flavour-flavor-developer-flavor-developer |
Icon and details |
Minimal Templates
| Template | Description |
|---|---|
link-template-flavor-developer-flavour-flavor-developer-flavor-developer-flavor |
Text link only |
link-template-flavor-developer-flavour-flavor-developer-flavor-developer-flavor-developer |
Minimal with size |
Using Link Templates
With Shortcode
Specify template in the shortcode:
[wpdm_package id="123" template="link-template-developer"]
Default Template
Set the default at Downloads > Settings > User Interface:
- Find Default Link Template dropdown
- Select your preferred template
- Save changes
All shortcodes without explicit template use this default.
Per-Package Template
Set template for specific package:
- Edit the package
- Go to Package Settings > General
- Select Template
- Save package
Template Comparison
link-template-default
The simplest template:
- Download button only
- No additional information
- Minimal footprint
Output: ┌─────────────────┐ │ Download │ └─────────────────┘
Best for: Inline mentions, minimal space
link-template-developer
Detailed developer-focused view:
- Package title
- Version number
- File size
- Download count
- Download button
Output: ┌───────────────────────────────────────┐ │ 📦 Package Name │ │ Version: 2.1.0 | Size: 5.2 MB │ │ Downloads: 1,234 │ │ [Download] │ └───────────────────────────────────────┘
Best for: Software downloads, technical content
link-template-flavor
Visual card with image:
- Featured image/icon
- Package title
- Short description
- Download button
Output: ┌───────────────────────────────────────┐ │ ┌──────┐ │ │ │ IMG │ Package Name │ │ └──────┘ Short description here... │ │ [Download] │ └───────────────────────────────────────┘
Best for: Visual showcases, product listings
link-template-flavor-developer
Combines flavor and developer styles:
- Image thumbnail
- Title and description
- Version, size, downloads
- Download button
Best for: Complete package presentation
Template Elements
Each template may include:
| Element | Tag | Description |
|---|---|---|
| Title | [title] |
Package name |
| Icon | [icon] |
Package icon |
| Thumbnail | [thumb] |
Featured image |
| Description | [excerpt] |
Short description |
| Version | [version] |
Version number |
| Size | [package_size] |
Total file size |
| Downloads | [download_count] |
Download count |
| Button | [download_link] |
Download action |
Customizing Display
CSS Styling
Each template has specific CSS classes. Add custom styles in:
- Theme’s
style.css - Appearance > Customize > Additional CSS
- Custom CSS plugin
Example:
/* Style the developer template */
.wpdm-link-template-developer {
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 20px;
}
.wpdm-link-template-developer .wpdm-download-link {
background: #4f46e5;
color: white;
}
Template-Specific Classes
| Template | CSS Class |
|---|---|
| default | .wpdm-link-template-default |
| developer | .wpdm-link-template-developer |
| flavor | .wpdm-link-template-flavor |
Viewing Available Templates
In Admin
- Go to Downloads > Templates
- Click Link Templates tab
- Browse all templates with previews
Template Files Location
Built-in templates:
/wp-content/plugins/download-manager/src/Package/views/link-templates/
Theme overrides:
/wp-content/themes/your-theme/download-manager/
Selecting the Right Template
| Use Case | Recommended Template |
|---|---|
| Simple download buttons | link-template-default |
| Software/code releases | link-template-developer |
| Product showcases | link-template-flavor |
| Documentation | link-template-developer |
| Media files | link-template-flavor |
| Minimal inline | link-template-default |
Template Output Examples
In Content
Download the latest version of our app: [wpdm_package id="123" template="link-template-default"]
In Grid
[wpdm_package id="123" template="link-template-flavor"] [wpdm_package id="124" template="link-template-flavor"] [wpdm_package id="125" template="link-template-flavor"]
Troubleshooting
Template Not Found
Cause: Typo in template name
Solution:
- Check spelling exactly
- Use template name without
.php - Verify template exists at Downloads > Templates
Styling Issues
Cause: Theme CSS conflicts
Solution:
- Inspect with browser developer tools
- Add more specific CSS selectors
- Use
!importantif necessary
Template Not Changing
Cause: Cache or per-package override
Solution:
- Clear caching plugins
- Check package-level template setting
- Verify shortcode has correct template param
Related Documentation
- Page Templates
- Creating Custom Templates
- Template Tags Reference
- [[wpdm_package] Shortcode](/doc/shortcodes/wpdm-package/)
Last updated: January 2026
Applies to: WordPress Download Manager 7.x