Page Templates
Overview
Page templates control how individual package pages display when users visit the package URL directly. Unlike link templates (for embedded content), page templates provide full-page layouts with comprehensive package information. WPDM includes 18 built-in page templates.
Prerequisites
- WordPress Download Manager installed
- Published packages
- Understanding of WordPress template hierarchy
Template Selection Priority
When displaying a package page, WPDM determines which page template to use in this priority order:
- Package Setting – Template selected in the package edit screen (highest priority)
- Global Default – Default template set in plugin settings (lowest priority)
Available Page Templates
| Template Name | Description |
|---|---|
page-template-default | Default Template – balanced two-column layout with sidebar |
page-template-default-simplified | Simplified Default – cleaner version of default template |
page-template-simple | Simple – minimal single-column layout |
page-template-1col | 1-Column – full-width single column layout |
page-template-1col-ex | 1-Column Extended – single column with additional details |
page-template-1col-ex-audio | 1-Column Audio – single column with audio player integration |
page-template-1col-flat | 1-Column Flat – flat design single column |
page-template-col2 | 2-Column – standard two-column layout |
page-template-col2-il | 2-Column Inline – two-column with inline elements |
page-template-metro | Metro Style – Windows Metro-inspired tile design |
page-template-image-gallery | Image Gallery – gallery-focused layout for visual content |
page-template-video | Video – optimized for video file packages |
page-template-youtube | YouTube – integrated YouTube video display |
page-template-doc-preview | Document Preview – with document preview functionality |
page-template-popup | Popup – designed for modal/popup display |
page-template-php | PHP Template – PHP-based custom template |
premium-package | Premium Package – layout for paid/premium products |
premium-package-1 | Premium Package Alt – alternative premium product layout |
Using Page Templates
Method 1: Per-Package Setting (Highest Priority)
Set a specific template for individual packages:
- Edit the package in Downloads > All Files
- Go to Package Settings tab
- Find the Page Template dropdown
- Select your preferred template
- Save/Update the package
This template will be used when viewing this package’s page.
Method 2: 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 Page Template option
- Select your preferred default template
- Save changes
This default will apply to all packages that do not have a specific template set.
Method 3: Theme Template Override
Create theme-level override:
- Create folder in theme:
download-manager/ - Copy template file from plugin
- Modify as needed
- WordPress uses theme version automatically
Template Examples
page-template-default
The standard two-column layout with sidebar:
[wpdm_package id="123" page_template="page-template-default"]
Best for: General purpose, software downloads, documents
page-template-simple
Minimal single-column layout:
[wpdm_package id="123" page_template="page-template-simple"]
Best for: Quick downloads, embedded content
page-template-1col
Full-width single column:
[wpdm_package id="123" page_template="page-template-1col"]
Best for: Detailed documentation, long descriptions
page-template-metro
Modern tile-based design:
[wpdm_package id="123" page_template="page-template-metro"]
Best for: Modern themes, visual impact
page-template-video
Optimized for video content:
[wpdm_package id="123" page_template="page-template-video"]
Best for: Video files, tutorials, media content
premium-package
Layout for paid products:
[wpdm_package id="123" page_template="premium-package"]
Best for: E-commerce, premium downloads, products with pricing
Template Files Location
Built-in templates are located at:
/wp-content/plugins/download-manager/src/Package/views/page-templates/
Theme overrides can be placed at:
/wp-content/themes/your-theme/download-manager/page-templates/
Template Tags
Each template can use these placeholder tags:
| Tag | Description |
|---|---|
[title] | Package name |
[description] | Full package content |
[featured_image] | Main package image |
[thumb] | Thumbnail image |
[download_link] | Download button |
[version] | Version number |
[package_size] | Total file size |
[file_count] | Number of files |
[download_count] | Download count |
[view_count] | View count |
[file_list] | List of attached files |
[categories] | Category links |
[tags] | Tag links |
[author] | Author name |
[publish_date] | Publication date |
[update_date] | Last update date |
[changelog] | Version history |
[share_buttons] | Social share buttons |
Template Hierarchy
WPDM checks for templates in this order:
your-theme/download-manager/page-template-name.phpyour-theme/download-manager/page-template-default.phpdownload-manager/src/Package/views/page-templates/page-template-name.phpdownload-manager/src/Package/views/page-templates/page-template-default.php
CSS Customization
Each template has wrapper classes for styling:
/* Page template container */
.wpdm-single-page {
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
}
/* Download button */
.wpdm-single-page .wpdm-download-link {
font-size: 18px;
padding: 15px 40px;
}
/* Package info cards */
.wpdm-single-page .package-info-card {
background: #f8fafc;
border-radius: 8px;
padding: 20px;
}
Troubleshooting
Template Not Applying
Check the priority order:
- Does the package have a template set in Package Settings?
- Is there a global default set in Settings > Default Values?
Template Not Found
- Verify the template name is spelled correctly (no
.phpextension needed) - Check that the template file exists in the page-templates directory
- Clear any caching plugins
Styling Issues
- Inspect elements with browser developer tools
- Add more specific CSS selectors
- Check for theme CSS conflicts