Hi,
I’d like to change the default page templates and link templates using PHP. I’ve tried following the steps in this article but can’t seem to get it working: https://www.wpdownloadmanager.com/doc/template-files/.
My dev site is at ebdev.uk/bus, and a sample download page is https://ebdev.uk/bus/download/testing-templates/.
What am I doing wrong?
Thanks
Emma
This reply has been marked as private.
Here is the link where you can see all of your tickets, https://www.wpdownloadmanager.com/support/users/dpatricksswhitedental-com/topics/,
And for the updated version it has been renamed, Archive Page Options, please check your screenshot
Thanks.
Recently updated download manager and all the passwords linked to each download have been lost. Is there a way I can bulk add the same password to all the downloads?
I am wondering if I can get some help so that the link template shown here https://weathermatic.box.com/s/r6qp95bdrf3brnkxu9042pbc5akj6les looks better. The top part of the image I would like to link up the thumbnail, line up the download button (I would actually like to not have a button but just text) and line up the title. Also, how can I change the download button used on the file list to match the top?
Here is my link template code:
<div class=”media” align=”center” style=”border: 1px solid; border-color: lightgrey; height: 240px”>
<div style=”clear: both;”></div>
<table>
<tbody>
<tr style=”height:100px;” align=”center”><td>[pdf_thumb_100x0]</td></tr>
<tr style=”height:50px;” align=”center” valign=”middle”><td>[file_type_icons] [download_link_popup]</td></tr>
<tr style=”height: 90px; font-size: x-small;” align=”center” valign=”top”><td>[title]</td></tr>
</tbody></table>
</div>
Thanks for the help!

BParticipant
This reply has been marked as private.
i used the button class: “wpdm-download-link wpdm-download-locked” and use the custom attribute “data-package=XXXXX”
Please check now. There was several options checked like Activate flat download url beta and other also, but the main thing I have adjusted unmask the download link option
. Now everything is okay.
Thanks.
Hi,
You can create the custom template in your active-theme/download-manager/page-templates/link-templates/custom-template.php
make the condition like this
$url = "YOUR_URL";
$modified = str_replace('lang=en&', '', $url);
and you can use the $modified one, let me know if it works for you.
Thanks.
Hi,
We have a site that has installed inside it as a plugin WPML and DOWNLOAD MANAGER.
An android application has also been created to display the site as an application.
Android to display the pdf requires that the download link be added to the download link “https://docs.google.com/gview?embedded=true&url=”.
We have modified the custom template so that that string is automatically added before the [download_url] tag.
The problem arises in English language which is added after the lang=en download link.
This generates the wrong display of the pdf.
How can we make sure that it is automatically removed from every link that has the string “lang=en”?
Working link:
https://docs.google.com/gview?embedded=true&url=https://www.rallydiromacapitale.it/download/hotel-booking-form-english-version/?wpdmdl=727&refresh=5ee0a6e8cd9d11591781096
Link is not working:
https://docs.google.com/gview?embedded=true&url=https://www.rallydiromacapitale.it/download/hotel-booking-form-english-version/?lang=en&wpdmdl=727&refresh=5ee0a6e8cd9d11591781096
Thanks in advace
This reply has been marked as private.
This reply has been marked as private.
For the link Download Limit erreicht – Mehr Infos hier it goes to,
This site can’t be reached
http://www.xxx unexpectedly closed the connection.
Hello,
the link from the Message from the Download Limit Message is wrong.
I have added this into the box…
Download Limit erreicht – Mehr Infos hier…
When the user click on the then go to
https://www.xxx.de/datei/lkw-3d-zeichnung/https:/www.xxx.de/infos/premium-user/
How can I fix it?
This reply has been marked as private.
Hi,
Please do such this way, create a link/page template PHP file in your active theme dir example: {active-theme}/dowload-manager/link-templates/my-custom-template.php
Now in my-custom-template.php, you can use PHP code too along with template tags, you can put this below code for showing if there any file attached or not, then showing the download button,
<?php if(count(WPDM()->package::getFiles($ID, true)) > 0 ) { ?> [download_link] <?php } ?>
please check and let me know.
Thanks.
<div class="card bg-light c2a4 mt-2 mb-2">
<div class="card-body text-center pb-4">
<div class="text-center wicon">
[thumb_128x128]
</div>
<h3 class="p-0 m-0 mb-2"><a style="font-weight: 700" href="[page_url]">[title][ifbutton]</a></h3>
<div class="text-muted text-small"><i class="fas fa-hdd"></i> [file_size] <i class="far fa-arrow-alt-circle-down ml-2"></i> [download_count] downloads [ifbutton]</div>
</div>
<div class="card-footer text-center">
<a href="[page_url]" class="btn btn-secondary">View More</a>
<div class="d-button d-inline-block">[download_link]</div>
<div class="ml-3 [hide_empty:download_link]">[download_link]</div>
</div>
</div>
<style>
.w3eden .c2a4 .wpdm_icon{ height: 64px !important; width: auto; } .well.c2a4 .media-body{ font-size: 11pt; }
.w3eden .c2a4 .wicon img{ border-radius: 500px; max-width: 96px;margin: 5px auto 25px; }
.w3eden .c2a4 .btn{ border-radius: 50px; font-weight: 500; margin: 0 3px; padding: 0 25px; height: 36px; line-height: 36px; font-size: 12px; }
</style>


I made it with the code above, but it doesn’t seem to work properly.
How can I use this tag properly?
-
This reply was modified 5 years ago by
Jaewon Kim.
one again.
i put 2 link in content.
When i click link 1 error displayed.
When i click link 2 the file will downloaded with no error
Hi,
We have released a new update ( 2.8.5 ) for the extended shortcode add-on, please update your copy, then the direct download link, I think it will work again. https://www.wpdownloadmanager.com/download/wpdm-extended-short-codes/

BParticipant
Hi! Thanks, it works in manual mode now, but the default behaviour from short code still does not work;
[wpdm_all_packages items_per_page="20" categories="stable" jstable=1 cols="page_link,file_count,package_size|version|categories|update_date|download_link" colheads="Title|Version|Categories|Update Date|Download::155px" order_by="update_date"]
It does som random (?) sorting – what is wrong with my shortcode?
I want to default update_date as the order (descending).
Hi Nayeem, thanks for your response..
Unfortunately, this will query all downloads, where all I would like to have is a page showing the categories to allow users to click and see the downloads for those categories. I could probably build a page and add images and have them linked to the categories, but wondered if there was a shortchode just to list the category names (preferably with the thumbnail for that category).
I see what you’re suggesting, which would give a kind of tabbed approach but it will query all the downloads which will slow things down for a root page.
Hi Greg Harte,
We are sorry for the inconvenience caused to you. Thank you for your patience. [wpdm_all_packages] doesn’t have the options to change download link from the shortcode as there are different kinds of packages.
But we’ve come with a solution to your problem – SHOWING ADD TO CART BUTTON IN [wpdm_all_packages] Responsive Table.
please follow the steps.
1. download the file (wpdm-all-downloads.php
) from here https://drive.google.com/file/d/1H-Prpy0CUaWP5PiDCD1H2teH6z3Kqh2u/view?usp=sharing
2. put the file into the following directory of your WordPress wp-content/themes/{YOUR ACTIVATED THEME}/download-manager/
(if the download-manager
folder not available in your ACTIVATED THEME then please create it)
that’s it. you should now see theAdd To Cart
button in the table rows.
Thanks.
I have investigated further and found that the custom formats are now being stored as xml files in a folder in the site, the location required did not exist on my installation, when I created the folder structure with the appropriate access rights then the custom formats could be created and saved and used.
Now all I have to do is work out what css I had before and put that into this new custom link format and set my packages to use that.
My guess is that the upgrade attempted to create this new folder location to put the existing custom formats into, failed, and carried on removing them from wherever they where stored before anyway. So they where not available for the upgraded download manager to use and all trace of them where they where before seems to have vanished to. In my case it is one custom format and a few packages, in some other customers installations this could be a lot of custom formats discarded and lot of packages reverted to using the default formats, that is a lot of work thrown away.
-
This reply was modified 5 years ago by
Colin Hart.
A little further investigation reveals that the custom format I had setup for the button to link from the sales page to the cart seems to have been removed by a recent Download Manager update , and it reverted to a default value.
How can I get the custom format back, I tried cloning an existing link template to generate a new custom format, that seemd to create and save but it does not appear in the list of link formats for the packages, they have all reverted to select a format and are using a default one.
I do not remember what the custom formatting was using is it still around in the WordPress database some where I can find it or has it been deleted by the update.
This is what I saying about your software not being stable, updates you release are breaking existing sites with no warning, people are trying to run businesses and don’t have time to be continually re-doing work they had done because you have ‘improved’ your software.
Hello
After setting up some sales funnels to go to the sales page I am using Download Manager Pro for I fortunately checked the sales page again to now find the format of the sales links which should link to the sales cart are broken, I had a custom CSS format in there and it was working and displaying properly before, if I have read some of the other isues on here correctly your latest update has broken that functionality.
I am trying to run a business here not play whack a mole with your updates breaking things that where working before I am wondering if your product will ever be stable enough to actually rely on, I want to market and sell products not mess with the website for ever that does not make me money.
It seems to me that you hack code and release it without any regression testing to see you have not broken existing functionality, that is not professional at all.