I’m trying to determine what the benefit to using Download Manger is. You don’t answer support questions. Your documentation is sparse at best and now your most recent update deleted all my custom templates. THANK YOU FOR BLOWING UP OUR NON-PROFIT INTRANET! YOU GUYS REALLY SUCK!
I can’t tell you the countless hours I’ve wasted with this component. Now I get to go restore pieces from my backup, because of your updates indiscriminate deletion of MY files.
Like you will even read this.
If you add/edit any file inside the plugin, updating plugin always will delete your custom changes, that’s how WordPress works, when you are updating a plugin, it deletes the old version, then installs new, wpdm can do nothing there if you don’t take a backup before upload. To add/edit template safely you had to follow the docs properly:
My apologies for not responding sooner. Your emails were going to my junk box. I’ve corrected that.
I understand custom overrides, so I tried this. The process described in the information you provided does not work.
I moved my two custom (link) templates from “\wp-content\plugins\download-manager\tpls\link-templates” to “\wp-content\themes\my-theme\download-manager”. After that, the custom templates were not not displaying correctly and no longer showed up in Downloads > Templates > Link Templates (tab).
Then, I moved my two custom (link) templates to “\wp-content\themes\my-theme\download-manager\link-templates”. Now they show up in Downloads > Templates > Link Templates (tab), but are still not being sourced and my pages are not displaying correctly. I refreshed pages, I cleared my cache, nothing helped.
Then, I moved my two custom (link) templates back to “\wp-content\plugins\download-manager\tpls\link-templates” and they started working again.
So please enlighten me as to what I am doing wrong or differently than what is being described here: https://www.wpdownloadmanager.com/doc/template-files/
Ed – I was on the same trail as you, trying to work out how to create custom templates in my theme folder structure.
I found that putting a template in “\wp-content\themes\my-theme\download-manager\link-templates” does work, as long as I give it a file name that didn’t exist in the plugin’s folder, and that the comment line at the top of my custom template is unique.
By the way, I’m not planning to use the page templates at present so I can’t comment on whether its easy to customise them.
Maybe that helps, or at least gives you some hope … I’m still checking that everything is in order, so if I find something weird, I’ll post again.
Maybe template name was incomplete in your pacakge shortcode. That’s why the shortcode didn’t generate the correct view when you placed the custom link template files in your theme dir. But you did saw the custom template in the Template list.
When writing the pacakge shortcode write the full filename of your custom link template as shown below,
[wpdm_package id=10 template="link-template-custom.php"]
I’ve figured it out. Hopefully, anyone else running into this problem will benefit from this thread.
Shafayet, regarding your comment about backing up before updating, I back up daily, if not more often. As I stated, I was able to restore the deleted file from my backup.
Doc Dunning, I appreciate you chiming in. However, my custom templates have unique names and those unique names are used within the template file, as well.
Shariar, your response got me on the right track. However, it was WP Download Manager “documentation” that got me in this mess in the first place.
For your reference.
According to this documentation, you are to use the “Template ID” in your short-code to source the template you desire. This does in fact work IF your custom template is in the “\wp-content\plugins\download-manager\tpls\link-templates” folder. However, once you move your custom templates to the “\wp-content\themes\my-theme\download-manager\link-templates” folder they will no longer work if you use the Template ID alone. You must then add “.php” to the end of the Tamplate ID in your short-code or your custom template WILL show up in Downloads > Templates > Link Templates (tab), but will NOT be sourced when you view the page, widget, etc. you’re using the short-code on.
Just a wild guess here…
Maybe there is a difference in the plug-in code between the free and the pro version of WP Download Manager?
Ed – you got it. My comments were based on using the Gutenberg blocks, not the short codes. I was just now using the short codes and getting the same issue as you reported. But then I added “.php” to the end of the template param, and all was well. Looks like the Gutenberg blocks have been coded to add that suffix. And yes, I’m using the free version.
You must be logged in to reply to this topic.