Templates

Page Templates

4 min read Updated Jan 30, 2026

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:

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

Available Page Templates

Template NameDescription
page-template-defaultDefault Template – balanced two-column layout with sidebar
page-template-default-simplifiedSimplified Default – cleaner version of default template
page-template-simpleSimple – minimal single-column layout
page-template-1col1-Column – full-width single column layout
page-template-1col-ex1-Column Extended – single column with additional details
page-template-1col-ex-audio1-Column Audio – single column with audio player integration
page-template-1col-flat1-Column Flat – flat design single column
page-template-col22-Column – standard two-column layout
page-template-col2-il2-Column Inline – two-column with inline elements
page-template-metroMetro Style – Windows Metro-inspired tile design
page-template-image-galleryImage Gallery – gallery-focused layout for visual content
page-template-videoVideo – optimized for video file packages
page-template-youtubeYouTube – integrated YouTube video display
page-template-doc-previewDocument Preview – with document preview functionality
page-template-popupPopup – designed for modal/popup display
page-template-phpPHP Template – PHP-based custom template
premium-packagePremium Package – layout for paid/premium products
premium-package-1Premium Package Alt – alternative premium product layout

Using Page Templates

Method 1: Per-Package Setting (Highest Priority)

Set a specific template for individual packages:

  1. Edit the package in Downloads > All Files
  2. Go to Package Settings tab
  3. Find the Page Template dropdown
  4. Select your preferred template
  5. 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:

  1. Go to Downloads > Settings > Default Values
  2. Find the Page 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.

Method 3: Theme Template Override

Create theme-level override:

  1. Create folder in theme: download-manager/
  2. Copy template file from plugin
  3. Modify as needed
  4. 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:

TagDescription
[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:

  1. your-theme/download-manager/page-template-name.php
  2. your-theme/download-manager/page-template-default.php
  3. download-manager/src/Package/views/page-templates/page-template-name.php
  4. download-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:

  1. Does the package have a template set in Package Settings?
  2. Is there a global default set in Settings > Default Values?

Template Not Found

  • Verify the template name is spelled correctly (no .php extension 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

Related Documentation