Building a WordPress Download Manager Link Template from scratch

Building a WordPress Download Manager Link Template from Scratch

Link Template renders the view of the WordPress Download Manager package shortcode. When a shortcode ( e.g. category short-code ) displays multiple packages link template controls the view of a single package in the list.

WordPress Download Manager Pro comes with a wide range of link templates. You can always choose from these predefined template files with your shortcodes. But sometimes built-in templates may not be enough for your specific use case. Custom Link Template is the answer in this situation. So in this tutorial, we are going to show you how to build a WordPress Download Manager Link Template from scratch.

How to Build a WordPress Download Manager Link Template?

You can create a Custom Link Template from scratch or edit already available templates by cloning them from Dashboard >> Downloads >> Templates page.

Now, we are going to build a Custom Link Template from scratch. Link Template is a combination of raw HTML codes and template tags. The template tags represent various data of the package. For example, [title] template tag shows the package name. You will find the list of available template tags in the Template Editor Sidebar (  Dashboard >> Downloads >> Templates page ). These tags are listed here too.

Let’s start. First, look at the design we will follow to make our Custom Link Template.

To create the custom link template go to Dashboard >> Downloads >> Templates page. Click on “Create Link Template” from the top bar. You will be redirected to a new page named “Template Editor”. The list of template tags is available on the right side of the editor.

First, give a title for the template so you can recognize it later. Now I am using the following code for our design. I used Bootstrap 3 “Panel” to make this template. You can use anything here to make your own structure. To add the style you can use a CSS block above the code. You can also insert template tags from the dropdown list of “Package info” or “Package Meta” above the editor.

You can click on the preview to see the link template preview instantly. Notice those template tags [version], [download_count], [download_link] etc. Those tags will be rendered to actual values in the frontend.

Now save the template and use it when inserting the shortcode in a page or post. To use this template as a default template for a package, go to the “Package Settings” meta box in the edit package page and select this custom link template in the ‘Link Template’ option.

That’s it. You have just built your first custom link template.

In the end, if this article has helped you, then please subscribe to our YouTube channel to get more tutorials related to WordPress. You may join our Facebook page to update yourself with more tips, solutions, offers and so on.

You may also ask any questions related to it in the comment or want us to write on some specific topics you have in your mind. We appreciate your further comments, support or suggestions!

Comments [ 4 ]

Leave a Reply