Docs / Shortcodes / [wpdm_direct_link] – Create a Direct Download Link

[wpdm_direct_link] – Create a Direct Download Link

The [wpdm_direct_link] shortcode creates a simple text link that triggers a download when clicked. Unlike other shortcodes that display package information, this creates a minimal inline link.

Basic Syntax

[wpdm_direct_link id="123"]

Parameters

ParameterTypeRequiredDefaultDescription
idintegerYesThe package ID
labelstringNoDownloadLink text displayed to users
targetstringNoSet to _blank to open in new tab
classstringNoCSS class names for styling
eidstringNoHTML element ID attribute
stylestringNoInline CSS styles

Usage Examples

Basic Link

[wpdm_direct_link id="42"]

Output: Download

Custom Label

[wpdm_direct_link id="42" label="Get the PDF"]

Output: Get the PDF

Open in New Tab

[wpdm_direct_link id="42" label="Download Now" target="_blank"]

Styled Link

[wpdm_direct_link id="42" label="Download" class="btn btn-primary" style="font-weight: bold;"]

Inline in Text

Perfect for embedding downloads within paragraphs:

You can [wpdm_direct_link id="42" label="download the user guide"] to learn more about the features.

Tips

  • This shortcode respects all package access controls (roles, locks, etc.)
  • If the user doesn’t have access, the link will redirect to the package page to show unlock options.
  • Use the class parameter to apply button styles from your theme.

Related

Last updated on January 26, 2026

Need Help?

Get support from our team or community forum.

Visit Support

Customization

Need custom features? We can help.

Request Quote