1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. Document Library Options

Document Library Pro - Full list of options

This is a complete list of all the options available in Document Library Pro, with links to full instructions for each option.

When you want to enable an option for all the document libraries on your site, then we recommend setting it globally on the plugin settings page. This means that you don't need to edit any shortcodes.

On its own, the [doc_library] shortcode will list all your documents using the default options from the settings page.

You can use the shortcode options listed below to override the global settings for each individual document library as required. This gives you more flexibility - for example, so that you can list different documents on different pages of your site; or to use the table layout for some document libraries and the grid layout for others.

Library content

  • layout - choose a table or grid layout for the library
  • content – controls which fields of information to display about each document. The table layout also has options to customize or remove the column headers
  • folders - controls whether documents are listed as a single list, or 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
  • doc_tag – lists documents with a specific tag
  • term – lists documents with a specific custom taxonomy term
  • cf – lists documents with a specific custom field value
  • status – lists documents with a specific status (e.g. publish)
  • year – lists documents published in a specific year
  • month – lists documents published in a specific month
  • day – lists documents published on a specific day of the month
  • document_author - lists the documents by a specific document author
  • exclude – excludes specific documents based on ID
  • include – lists specific documents based on ID
  • exclude_doc_category – excludes entire categories of documents
  • exclude_term - excludes taxonomy terms
  • docs_per_page – sets the number of documents on each page of the library
  • doc_limit – sets the maximum number of documents that can appear
  • link - displays a link to the document
  • link_style - 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 - controls whether the document link opens the document directly or links to the single document page
  • link_target - controls whether links to the document open in a new tab
  • clickable_fields - controls which fields are clickable to the single document page

Additional options for table layout: 

Document previews

  • preview - enable a preview option allowing users to view the document online
  • preview_style - displays the preview option as a button, icon or text link
  • preview_text - 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 – add filter dropdown lists above the table
  • search_term - filter by search term when the table first loads (table layout only)
  • folders_order - defines the order of the folders in ascending or descending
  • folders_order_by - Adds a folder sorting criteria such as name, slug, term order, or count

Control elements above & below the table

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

Sizing & styling

  • widths – sets the width of each column (table layout only)
  • grid_columns - controls the number of documents per row (grid layout only)
  • content_length - sets the number of characters in the 'content' field
  • excerpt_length - sets the number of characters in the 'excerpt' field

Images

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

Mobile visibility & responsive options

Table layout only:

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

Performance

Table layout only:

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

Miscellaneous options

  • no_docs_message – controls the text that appears if no posts are found when the table first loads
  • no_docs_filtered_message – controls the text that appears if no results are found when a user searches or filters the table
  • numeric_terms - fixes any issues if you're using numeric slugs for your categories or taxonomies

Table layout only:

  • shortcodes – displays content generated by other shortcodes in the table (e.g. buttons or embedded audio or video players)
  • search_on_click – controls whether clicking on a category, tag or custom taxonomy will filter the table or link to the relevant archive page
  • date_format – sets the date format for any date columns
  • date_columns – specifies which columns contain dates, so that the column can be sorted by date correctly

Document library shortcode examples

To get you started, here are some popular examples of different ways to use Document Library Pro.

Basic usage displaying all documents:
[doc_library content="image,title,content,date,doc_author"]

Display documents from a single category (use the category slug or ID):
[doc_library content="title,excerpt,doc_tags" doc_category="news"]

Display documents from several categories. This example shows documents in the “ebooks” category or the “audiobooks” category: [doc_library doc_category="ebooks,audiobooks"]

Display documents that belong to several categories. This example shows documents that are in the “featured”, “course”, and “health” categories:
[doc_library doc_category="featured+course+health"]

Exclude documents from a category. This example excludes documents in the “clients” category:
[doc_library exclude_doc_category="clients"]

Display featured image. Defaults to 50 by 50 pixels, but you can specify a custom image size if you wish:
[doc_library content="image,title,content" image_size="80x80"]

Choosing custom column headings for a document table:
[doc_library content="title:Document Name,content:Description,doc_author:Written By"]

What else can I do?

Please also see our articles on advanced usage and developer documentation. We've also published a list of compatible third party plugins that you can use with Document Library Pro.

Related Articles

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