I think this is a good time to spell out the configuration of my site (you can skip this page if you just want the code, but do it at your own risk – my configuration is different from the default):

All of our clinic forms are sub-pages of a page called “Forms”. Each of the “form pages” uses a custom built WordPress Template called “Forms”. Each of the form pages points to a file that was uploaded to our local server – it was not uploaded through the media library (making this work with the Media Library is possible, I found, but messy – if you need it done, and we’re talking about having more than 1,000 media files, leave a comment and I’ll post an update).

Since the pdf’s and doc’s are not “attached” like media uploaded via the Media Library, each page has a custom field called “FileName” and the value of the custom field is simply the filename, like “0423_employee_handbook.pdf”. The “Forms template” then points to the directory where the forms are stored (./wp-content/forms/) and the custom field adds the file name to complete the download url.

All of the download managers for WordPress put the title and filename of the download into a MySQL table. Since all of my forms have a custom field called “FileName”, I simply need to create a list of those posts. Then I needed to find the values stored in the custom field called “FileName” that links each form page to the download-able form.

Let’s translate all of that to MySQL terminology:

pages: 1 2 3 4 5 6 7

4 Responses to How to Add Uploaded Media to WP-DownloadManager

  1. LikeCamping says:

    Thank for Information

  2. KrisBelucci says:

    Hi, cool post. I have been wondering about this topic,so thanks for writing.

  3. Ismail says:

    Thanks for your valuable information. I will try it……

  4. Abnehmen says:

    Thank you for this post. This is what I’m looking for.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">