1. Home
  2. Knowledge Base
  3. Document Library Lite
  4. Getting Started

Document Library Lite - Documentation

The free Document Library Lite plugin lets you create a simple and professional-looking document library.

The free plugin contains all the essential features to add and display downloadable documents on any WordPress website. The premium version, Document Library Pro, adds many more features including extra layout options, document previews, button styles, support for third party links, multi-download checkboxes, a separate page for each document, and more.

Installing the plugin

  1. Go to Plugins → Add New in the WordPress admin.
  2. Search for 'Document Library Lite' and install the plugin by Barn2.
  3. Activate the plugin.

The fastest way to set up the plugin is to use the setup wizard, which opens when you first activate the plugin. All of the features are fully documented below.

Plugin settings

You can find the plugin options panel at Documents → Settings.

General tab

  • Document fields (Premium version only). Controls the fields that are available for your documents. 
  • Document lists
    • Document library page - Select the page where all your documents are listed. A new page called 'Document Library' is created for you and selected automatically when you first install the plugin.
    • Default layout:
      • Table - Lists your documents in a table layout.
      • Grid (Premium version only) - Lists documents in a tiled grid layout. 
    • Folders (Premium version only) - Structures the document library into folders based on their category.
  • Document links
    • Link to document (Premium version only) - Adds links to an individual page for each document. 
    • Link style (Premium version only) - Allows you to replace the download button with icons, text links, file type icons, and more.
    • Link text - Changes the 'Download' text in the button.
    • Link destination (Premium version only) - Controls whether clicking on a link to a document will download the document immediately, or open the single document page first. 
    • Link target (Premium version only) - Controls whether or not to open document links in a separate browser tab. 
    • Clickable fields (Premium version only) - Controls which fields in the document library are clickable. 
  • Document preview (Premium version only) - Allow users to preview documents in a lightbox. 
  • Library content
    • Image lightbox - Enable this to allow users to view document featured images in a lightbox.
    • Shortcodes (Premium version only) - Allow the main document library page to display formatted content such as HTML, embedded audio and video, and shortcodes added by other plugins. 
    • Excerpt length (Premium version only) - The number of characters to display in the 'excerpt' column of the library. 
    • Content length (Premium version only) - The number of characters to display in the 'content' column of the library. 
  • Document library controls
    • Search box (Premium version only) - Reposition the document search box or hide it completely. 
    • Reset button (Premium version only) - Show or hide the reset button above the library. 
  • Number of documents
    • Documents per page - The number of documents to show on each page of the table.
    • Pagination type (Premium version only) - Choose between 4 different types for the pagination links under the table, or hide them completely. 
    • Pagination position (Premium version only) - Reposition the pagination links. 
    • Totals (Premium version only) - Change the position of the document total, e.g. "Showing 1 to 5 of 10 documents", or hide it completely. 
  • Sorting
    • Sort by - The initial sort order of the documents in the library.
    • Sort direction - The sort direction of the document library.

Document Tables tab

The free plugin lets you choose which columns to include in the library. Document Library Pro has lots of extra features to customize the document tables even further.

  • Library content
    • Columns - Enter the columns to include in the document library, in a comma separated list (e.g. title, content, link):
      • id - The document's WordPress database ID.
      • title - The document title.
      • content - The document content that you entered on the 'Add Document' page.
      • excerpt (Premium version only) - The document excerpt or summary. 
      • image - The document's featured image.
      • date - The date that the document was added to your WordPress site.
      • date_modified (Premium version only) - The date that the document was last modified on your WordPress site.
      • author (Premium version only) - The WordPress user who added the document to your site. (Tip: If you want to display the actual author of the document then we recommend creating a custom field or taxonomy and displaying that instead.) 
      • doc_categories - A comma separated list of the document categories.
      • doc_tags (Premium version only) - A comma separated list of the document's tags. 
      • file_size (Premium version only) - The file size of the downloadable document. This is generated automatically for supported file types (e.g. PDF), and you can enter it manually for other file types. 
      • file_type (Premium version only) - The document's file type, e.g. MP4 or PDF. This is generated automatically. 
      • status (Premium version only) - The post status of the document, for example published, private or draft. 
      • link - A download button for each document.
      • cf:[custom-field-name] and tax:[taxonomy-slug] any custom field or taxonomy (Premium version only) - In addition, you can install a free custom field/taxonomy plugin such as Easy Post Types and Fields and use it to create an unlimited number of extra fields for your document libraries. 
    • Image size (Premium version only) - The default image size for the 'image' column if 70x70 pixels. You can change this here. 
  • Document links
    • Accessing documents (Premium version only) - Decide whether people will download files by clicking a button for each document, using multi-select checkboxes to download multiple documents at once, or both. 
    • Multi-download button (Premium version only) - Choose the position of the 'Download Selected Documents' button. 
    • Multi-download button text (Premium version only) - Change the text in the 'Download Selected Documents' button. 
  • Loading & performance
    • Lazy load (Premium version only) - For large document libraries, enable the lazy load option to prevent performance problems. This loads one page of the table at a time, so you can list unlimited documents without experiencing slow load times. 
    • Document limit (Premium version only) - Set the maximum number of documents which can appear in each table. 
    • Caching (Premium version only) - Cache the document library to improve the load time. 
  • Document library controls
    • Search filters (Premium version only) - Display filter dropdowns above the table so that users can filter documents by category, tag, or any custom taxonomy. 
    • Page length (Premium version only) - Change the position of the 'Show [x] documents' dropdown list, or hide it completely. 
  • Design 
    • Design (Premium version only) - Restyle the document library by changing the colors and fonts of the table borders, background, text, adjust the spacing, and more. 

Document Grid tab

Document library grid layout

The grid layout is only available in Document Library Pro. With the free version, documents are listed in a table.

Single Document tab

Single document page

The single document page is only available in Document Library Pro. With the free version, the documents can be downloaded directly from the main document library page.

Adding and importing documents

Adding documents

  1. Go to Documents → Add New.
  2. Add all the information for your document and remember to upload a file for people to download.
  3. Click 'Publish'.

The document will appear on your main 'Document Library' page (which you selected in the plugin settings). It will also appear in any other document libraries, for example if you have created them using a shortcode.

Bulk importing documents

The premium version lets you upload documents via drag and drop or by uploading a CSV file.

[doc_library] shortcode

As well as the main Document Library page which automatically lists all your documents, you can list documents anywhere using the [doc_library] shortcode.

By default, the shortcode will inherit the options from the plugin settings page. To override these for an individual document list, use the following shortcode parameters:

Library content

  • content – controls which columns of information to display about each document. The premium version also has options to customize or remove the column headers
  • layout (Premium version only) - choose a table or grid layout for the library
  • folders (Premium version only) - controls whether documents appear in a single list, or are structured into folders by category

Choosing which documents are listed

There are lots of ways to list specific documents only:

  • doc_category – lists documents from a specific category
  • status – lists documents with a specific status (e.g. Published)
  • docs_per_page – sets the number of documents on each page of the library
  • doc_tag (Premium version only) – lists documents with a specific tag
  • term (Premium version only) – lists documents with a specific custom taxonomy term
  • cf (Premium version only) – lists documents with a specific custom field value
  • year (Premium version only) – lists documents published in a specific year
  • month (Premium version only) – lists documents published in a specific month
  • day (Premium version only) – lists documents published on a specific day of the month
  • author (Premium version only) - lists documents by a specific author/user
  • exclude (Premium version only) – excludes specific documents based on ID
  • include (Premium version only) – lists specific documents based on ID
  • exclude_category (Premium version only) – excludes entire categories of documents
  • exclude_term (Premium version only) - excludes taxonomy terms
  • doc_limit (Premium version only) – sets the maximum number of documents that can appear
  • link (Premium version only) - displays a link to the document.
  • link_style (Premium version only) - displays the document link as a button, icon or text link
  • link_text - controls the text in the link button or text link
  • link_destination (Premium version only) - controls whether the document link opens the document directly or links to the single document page
  • link_target (Premium version only) - controls whether links to the document open in a new tab
  • clickable_fields (Premium version only) - controls which fields are clickable to the single document page
  • accessing_documents (Premium version only) - controls whether to display a link alongside each document, multi-select checkboxes, or both
  • multi_download_button (Premium version only) - controls the position of the 'Download Selected Documents' button
  • multi_download_text (Premium version only) - controls the text in the 'Download Selected Documents' button

Document previews

  • preview (Premium version only) - enable a preview option allowing users to view the document online
  • preview_style (Premium version only) - displays the preview option as a button, icon or text link
  • preview_text (Premium version only) - controls the text in the preview button or text link

Sorting & ordering

  • sort_by – controls how the posts are sorted when the table first loads
  • sort_order – sorts the table in ascending or descending order
  • filters (Premium version only) – add filter dropdown lists above the table (table layout only)
  • search_term (Premium version only) - filter by search term when the table first loads (table layout only)

Control elements above & below the table

  • scroll_offset – changes the height that the page scrolls to when you move between pages in the table
  • show_footer – shows or hides the footer row of the table
  • search_box (Premium version only) – shows, hides or positions the keyword search box
  • page_length (Premium version only) – shows, hides or positions the “Show <x> posts” dropdown list (table layout only)
  • totals (Premium version only) – shows, hides or positions the post totals (e.g. “Showing 1 to 10 of 50 posts”)
  • reset_button (Premium version only) – shows, hides or positions the reset link
  • pagination (Premium version only) – shows, hides or positions the pagination buttons (previous, next etc)
  • paging_type (Premium version only) – sets the pagination style

Sizing & styling

  • content_length (Premium version only) - sets the number of characters in the 'content' field
  • widths (Premium version only) – sets the width of each column
  • excerpt_length (Premium version only) - sets the number of characters in the 'excerpt' field


  • lightbox - control whether the document images open in a lightbox
  • image_size (Premium version only) – sets the size of featured images in the table

Mobile visibility & responsive options

Table layout only:

  • wrap – controls whether or not content is wrapped onto multiple lines
  • priorities (Premium version only) – controls which columns are hidden on screen sizes when there are too many to fit on the page
  • column_breakpoints (Premium version only) – provides fine-grained control over the breakpoints for each column when viewed on smaller screen sizes
  • responsive_control (Premium version only) – controls the + icon which shows hidden rows
  • responsive_display (Premium version only) – sets whether hidden rows are visible or hidden, or open in a modal window


  • lazy_load (Premium version only) – improves performance by loading the overall page before the table, and loading 1 page of posts at a time
  • cache (Premium version only) – whether to use caching to speed up table load time

Miscellaneous options

  • search_on_click – controls whether clicking on a category, tag or custom taxonomy will filter the table or link to the relevant archive page
  • no_documents_message (Premium version only) – controls the text that appears if no posts are found when the table first loads
  • no_documents_filtered_message (Premium version only) – controls the text that appears if no results are found when a user searches or filters the table
  • numeric_terms (Premium version only) - fixes any issues if you're using numeric slugs for your categories or taxonomies
  • shortcodes (Premium version only) – displays content generated by other shortcodes in the table (e.g. buttons or embedded audio or video players)
  • date_format (Premium version only) – sets the date format for any date columns
  • date_columns (Premium version only) – specifies which columns contain dates, so that the column can be sorted by date correctly

Viewing documents in the Media Library

Filter WordPress Media Library by Documents

The downloadable files uploaded to individual documents are stored in the Media Library. You can filter the Media Library to only view document files - this is a good way to manage them and keep them separate from other media files (e.g. images for your pages and posts).

  1. Click Media in the left of the WordPress admin.
  2. Make sure you are on the List view rather than the Grid view (to change view, use the icons underneath the 'Media Library' heading).
  3. Select 'Documents' from the 'All types' dropdown.
  • 'Document Library Pro: Search Box' widget (Premium version only)
  • [doc_search] shortcode (Premium version only)

Third party plugin compatibility

We have tested the premium Document Library Pro plugin with dozens of other plugins so that you can add even more features to your document libraries.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.