The challenge: Document Library Pro is a sophisticated file upload plugin for WordPress. It allows you to create a searchable and filterable file library on your WordPress site. It includes the ability to add custom fields, and customize the front end functionality quite a bit. It’s great!
However, for our purposes, it had one big flaw. It only allows users to upload files through the WordPress back end. This can be done by:
- Add each document manually by going to Documents → Add New.
- Select files in the WordPress Media Library and convert them to documents.
- Use the drag and drop file upload tool.
- Prepare a CSV file and import documents in bulk.
What it can’t do is allow front-end users of the website to upload files without accessing the WordPress back end.
The solution: Ninja Forms, with two add-ons: Front-End Posting and File Uploads.
What you need to know: Document Library Pro uses a custom post type called “Document.” The Ninja Forms Front End Posting add-on will allow you to set a custom post type in your form. The documentation for this feature is here. So, to create a nice, pretty Ninja Form that front end users can use to add documents to the library, all you need to do is build a form that mirrors the fields you’re using in Document Library Pro. Add a File Upload button, and voila!
Note: This does not appear to work well with caching turned on in Document Library Pro. If you want your end users to be able to see the file they uploaded, caching should be turned off.