WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

WordPress Document Library Plugin: The Complete Guide

Last Updated on March 23rd, 2021

Published on February 19th, 2018

Tags:

Share This Article

A WordPress document library plugin is a popular way to list PDF files or other documents in a structured format with download links. A good document library makes it quick and easy for people to find the items they need – for example, with search options and filters. It also makes it easy for you to add and manage documents, saving you time.

Surprisingly, there aren’t many good quality WordPress document library plugins around – free or premium. One of the most popular options is a plugin called Document Library Pro. It has all the features that you need for a fully functional document library.

Today, I’m going to show you how to use the Document Library Pro plugin to create a searchable WordPress document library with filters, download links, and extra data about each document. Your finished document library will be similar to this:

DocLib-Animated-Document-Library

If you like what you see, keep reading and I’ll show you how to do it!

Who Needs a WordPress Document Library Plugin?

In my 8 years of designing WordPress websites, I’ve been amazed at how many people need an online document library. It’s one of the most common requests, up there with e-commerce and events management.

Here are some examples of how a WordPress document library can benefit your site.

Public Document Library

Many WordPress websites include a document library listing various types of publication in an easy-to-find format. This might be called something other than ‘document library’, such as ‘Resources’, ‘Downloads’ or ‘Knowledge Hub’. If it’s a way to store files or other types of document, then it’s a document library!

You can use a WordPress document library to provide any types of downloadable file that people will find useful. If you’re a charity then your document library might include publications and printable fundraising materials. If you’re a membership organization then your document library might include membership materials, such as downloadable logos and trust badges. An advice website might create a document library containing downloadable resources.

Database of Technical Specification Sheets

A WordPress document library is a good way of publishing technical documents or instructions for your products. For example, you can list the specification sheet for each document in a table with links to downloadable PDF’s. This can either be a standalone page on your website, a section of your knowledge base, or part of a WooCommerce website if you sell online.

Document Library Pro has a sister plugin called WooCommerce Product Table, which lists products in a table view with links to downloadable spec sheets. Use this if you need to sell products as well as providing downloadable files.

Article Continues Below

Staff Intranet with Policies & Procedures

Lots of organizations need a simple way to create a staff intranet with downloadable policies and procedures. This needs to be available to all employees, both onsite and working remotely.

If you’re on a budget and don’t want an Enterprise-level solution like SharePoint, then a password protected WordPress document library is a neat option. You can add each policy document as a downloadable file (e.g. PDF, DOC or any other format), or publish the full text of the document directly on a web page.

You can restrict your document library from public view with the Password Protected Categories WordPress plugin. Just put all your policy documents in 1 or more password protected categories, and give the password to your employees. Use the same password to restrict the main document library page with the same password, and you’re good to go! This is much easier than a full membership plugin because you don’t need to bother with individual user accounts for each employee.

How to Build a WordPress Document Library

Ok, so now you know why a website might need to store and display files and documents. Next, I’ll show you how to create your own document library.

We’ll do this by creating a document library for a fictional membership organization. It will contain a range of documents to show you what’s possible with the WordPress document library plugin. We’ll also add extra features such as keyword search box, multiple filters, and extra columns of information about each document.

The Document Library Pro plugin will take care of the whole process: adding and storing the documents in WordPress; and displaying them in a searchable document library on the front end of your website. I’ll tell you how to set it up next.

To get started, install the WordPress document library plugin on your site.

1. Choose Your Document Library Fields

Before you start, it’s worth writing a list of the information that you plan to include in the document library. This will affect which fields you need for the Documents.

The WordPress document library plugin comes with a range of built-in fields. These are all optional and you can choose whether to include each one in your document lists.

Available document library fields

  • Standard fields that are available for all WordPress posts. This includes the post title, content editor, excerpt, date, author, and featured image.
  • Document categories document tags. You can organize the WordPress document library into categories and tags. These are managed separately from the other categories and tags on your site.
  • Modified date, file size and file type. These are also generated automatically.
  • File type and size. These are also generated automatically.
  • Document link. Most importantly, you can upload documents to the library or store links or where the document files are hosted. The WordPress document library plugin supports all file type, whether you host them in the Media Library or externally. You can also ignore this field and embed documents directly into the content editor – for example, using a flip book, Google Drive embedder plugin, or even an embedded audio or media player.
  • Custom fields. These are extra fields that you can use to store data about your documents. If you need these then I recommend adding them with the free Custom Post Type UI plugin (although all custom field plugins are supported). Simply choose from various field types such as text, WYSIWYG editor and date, and assign the field to the ‘Documents’ post type. Use custom fields for information that you need to show in the document library, but which doesn’t need to be filterable. For example, use a WYSIWYG Visual Editor field to add a clickable download button or link to the document library.
  • Custom taxonomies. Custom taxonomies are similar to WordPress categories. You can use them to group and filter the items in your document library. Again, you can create custom taxonomies for free with the Custom Post Type UI plugin.

My Recommendations

I decided to create the following fields for my fictional document library. Your list will probably be similar to this:

Article Continues Below

  • Standard fields:
    • Title – The name of each document.
    • Content – For downloadable documents, I used this to add a brief excerpt or summary. For online documents, I added the full content of the document to this field and showed the first few words on my main document library page.
    • Date – The ‘Published’ or ‘Last Modified’ date of each document.
    • Featured image – An image or icon showing each file type. (The WordPress document library plugin can also display a file type image automatically in the download link column. However, as an experiment I decided to show static file type icons separately from a download button.)
    • Download link – A button or text link directly to the document file.
  • Custom fields:
    • Reference – ‘Text’ field type.
  • Custom taxonomies:
    • Year – This lets people filter the library for documents published in a specific year.

Once you’ve added your documents, it’s time to start building the document library for real!

2. Add or Import Your Documents

The WordPress document library plugin creates a dedicated ‘Documents’ section in the WordPress admin. This makes the library easy to manage as the document library grows over time, keeping the documents separate from your other media files.

You can start adding documents straight away.

Amazingly, there’s a choice of four ways to add documents. Use whichever method will be quickest and easiest for you.

  1. Add documents manually – Go to Documents > Add New and add each document individually, exactly like creating a WordPress page or post. Add all the information that you want to display in the document library, and upload the document file itself. You can either upload it directly to WordPress, or link to a document which is stored on a third party website such as Office 365 or Google Drive.
  2. Add from Media Library – Your document files might already be in the WordPress Media Library. If so, select them in the Media and click ‘Add to document library’ from the bulk actions list.
  3. Drag and drop – Go to Documents > Import and use drag and drop to add multiple documents at once.
  4. CSV uploader – For a truly bulk and automated option, go to Documents > Import and upload a CSV file. The document library plugin knowledge base tells you how to format the CSV file to contain the download link and data about each document.
DocLib-Add-Document

3. Create a Front End WordPress Document Library

Now comes the fun part, as this is where your document library really comes to life! The Document Library Pro plugin lists the documents in a neat table layout with all the information you added, plus search box and filters.

First, it’s good to see how the document library looks straight out of the box. To do this, find the ‘Pages’ area in the WordPress admin and then find a page called ‘Document Library’. View the page, and you’ll see the default setup of the document library.

It probably looks pretty good already. However, you can customize it on the document library plugin settings page.

Customizing the document library page

Edit the page and you’ll see that the WordPress document library plugin has added a [doc_library] shortcode to it. This automatically displays all your documents.

The plugin has dozens of options to modify the shortcode. You can use this to add multiple shortcodes, each listing different documents (e.g. on different pages). You can also edit other details in the shortcode. However, it’s easier to do this centrally on the plugin settings page – so I’ll show you how to customize the document library that way instead.

First, make any other changes to the document library page itself. For example, you can rename the page if you want. Call it ‘Document Library’, ‘Resources’, ‘Publications’, ‘Knowledge Base’, or whatever you like.)

Article Continues Below

If your theme comes with a full-width template, select this – it will allow more space for the information in the document library.

You can also add other types of content (e.g. text and image) which will appear above and below the list of documents.

Customizing the document library contents

  1. Go to Documents > Settings > Document Libraries in the WordPress Dashboard.
  2. Read through the options and configure them to suit your needs. For example, you can:
    • Change the document library columns. List the columns that you want to include. For my WordPress document library, I used cf:reference, title, content, doc_categories, date, image, link. There are lots of columns available as we saw earlier, so use the plugin documentation to set them up. You can also add custom column. headings – for example, to rename the ‘Title’ column to ‘Document Name’.
    • Display the document library as folders. By default, the WordPress document library plugin will list all the documents in a single table. You can enable the ‘Folders’ option to structure it into clickable folders instead. Users can click on each folder to view a table listing the documents from that category.
    • Control the download links. There are several options to choose how the document library download links behave. For example, you can style them as a button, file type icon or text link. You can also choose whether people can download the document directly, or be taken to an individual document page first.
    • Disable the single document page. By default, columns such as ‘title’ will link to a separate page for each document. This will display extra information about the document along with the download link. If you don’t need this then add none to the ‘Clickable columns’ option.
    • Add filters. Choose which filter dropdowns will appear above the document library. I chose the ‘Custom’ filters option and added doc_categories, tax:year to show filters for my document categories and year.
  3. Finally, save the plugin settings page.

How to Display Custom Fields and Taxonomies

As you may have noticed in the previous section, you need to add a bit of extra syntax to show custom fields and taxonomies in the document library. This is needed whether you’re showing them as columns or filter dropdowns. Here are some notes to help you with this:

  • Custom fields – You can add each custom field as a separate column in the document library. Add cf: before the Custom Field Name to tell the document library plugin that it’s a custom field. For example, if your custom field is called ‘reference’ then you need to add it as ‘cf:reference’. 
  • Taxonomies – You can add each custom taxonomy as a separate column, or as filter dropdowns at the top of the document library. Add tax: before the taxonomy name, for example ‘tax:document_year’. The name of the taxonomy is the same as the Singular Label you added when you created the taxonomy back in Step 1. If you added the Singular Label as multiple words (e.g. ‘Document Year’) then the taxonomy name will generally use this with an underscore (NOT a hyphen) in between.

4. View the finished Document Library

Now, view the page you just created. It will look something like this:

DocLib-WordPress-Document-Library

Of course, your columns will be different, and if you enabled the ‘Folders’ option then the document library will be structured into folders.

In my example, the documents are listed in a neat table view with all the columns I added to the shortcode. There are filter dropdowns above the table so that people can quickly find the documents they want. There’s also a keyword search box. Users can click on a category to view documents from that category only. They can click on the Download link or button to access the file. Neat!

If any information is missing, then there’s probably an error in the shortcode or you’ve used the wrong name for your post type, custom fields or taxonomies. Check these and refer to the documentation until it’s working.

4. Perfecting Your WordPress Document Library

By now, you’ve built a fairly impressive document library. All the documents are listed in a neat-looking table with search box and filters.

However, the Document Library Pro plugin is much more powerful than that. There are many more options that you can use to fine-tune the document library. Here are some that you might find useful, with links to the relevant parts of the documentation.

Creating Multiple Document Libraries

  • Create multiple tables listing different documents – In Step 3, I showed you how to create a 1-page document library listing all your files. If you prefer, you can list different documents on different parts of your site. For example, you might like to create a multi-page document library with a different category per page.
  • Change how the documents are ordered – By default, the WordPress document library plugin will list the documents with the most recent first. There are lots of other ways to sort the document library, such as alphabetically by title.
  • Show or hide different elements – There are lots of options to show, hide or move the sections above and below the document library, such as the search box and pagination buttons. I recommend removing any elements that aren’t crucial. This ensures a clean look and feel, drawing the user’s attention to the most important details.

Behind the Scenes

  • Lazy load for faster page load times – If you have lots of documents, then you can improve the performance of your WordPress document library by enabling the lazy load option. This loads 1 page of the document library at a time, instead of loading everything all at once. When users click on the pagination links at the bottom, the next page of documents will load.
  • Mobile-responsive options – Your WordPress document library will be 100% responsive and mobile-friendly straight out of the box. The columns in the table of documents will automatically resize to fit different screen sizes. If there’s too much information to fit on the screen, then the least important columns will be hidden. People can see the hidden columns by clicking on a + icon. Document Library Pro has various options to change how the document library adapts to smaller screen sizes, for example by opening hidden content in a lightbox instead.

Wrapping Up

It’s surprisingly easy to create a professional-looking WordPress document library. This tutorial has provided everything you need about how to use create a document library with Document Library Pro.

You’ve learned which plugin to use, how to store your documents, and then how to list them in a searchable document library – including extras such as a keyword search and filters.

I’d love to hear how you get on with building your own document library. Please add your comments below.

Stay informed on WordPress

Every Friday you’ll receive news, tutorials, reviews, and great deals from the WordPress space.

Invalid email address
A team of WordPress experts that love to test out new WordPress related software, WordPress plugins and WordPress themes.