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 librarycontent
– controls which fields of information to display about each document. The table layout also has options to customize or remove the column headersfolders
- 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 categorydoc_tag
– lists documents with a specific tagterm
– lists documents with a specific custom taxonomy termcf
– lists documents with a specific custom field valuestatus
– lists documents with a specific status (e.g. publish)year
– lists documents published in a specific yearmonth
– lists documents published in a specific monthday
– lists documents published on a specific day of the monthdocument_author
- lists the documents by a specific document authorexclude
– excludes specific documents based on IDinclude
– lists specific documents based on IDexclude_doc_category
– excludes entire categories of documentsexclude_term
- excludes taxonomy termsdocs_per_page
– sets the number of documents on each page of the librarydoc_limit
– sets the maximum number of documents that can appear
Document links
link
- displays a link to the documentlink_style
- displays the document link as a button, icon or text linklink_text
- controls the text in the link button or text linklink_destination
- controls whether the document link opens the document directly or links to the single document pagelink_target
- controls whether links to the document open in a new tabclickable_fields
- controls which fields are clickable to the single document page
Additional options for table layout:
accessing_documents
- controls whether to display a link alongside each document, multi-select checkboxes, or bothmulti_download_button
- controls the position of the 'Download Selected Documents' buttonmulti_download_text
- controls the text in the 'Download Selected Documents' button
Document previews
preview
- enable a preview option allowing users to view the document onlinepreview_style
- displays the preview option as a button, icon or text linkpreview_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 loadssort_order
– sorts the table in ascending or descending orderfilters
– add filter dropdown lists above the tablesearch_term
- filter by search term when the table first loads (table layout only)folders_order
- defines the order of the folders in ascending or descendingfolders_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 boxpage_length
– shows, hides or positions the “Show <x> posts” dropdown listtotals
– shows, hides or positions the post totals (e.g. “Showing 1 to 10 of 50 posts”)reset_button
– shows, hides or positions the reset linkpagination
– shows, hides or positions the pagination buttons (previous, next etc)paging_type
– sets the pagination styleshow_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' fieldexcerpt_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 linespriorities
– controls which columns are hidden on screen sizes when there are too many to fit on the pagecolumn_breakpoints
– provides fine-grained control over the breakpoints for each column when viewed on smaller screen sizesresponsive_control
– controls the + icon which shows hidden rowsresponsive_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 timecache
– 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 loadsno_docs_filtered_message
– controls the text that appears if no results are found when a user searches or filters the tablenumeric_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 pagedate_format
– sets the date format for any date columnsdate_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"]
Standalone document search
- Document Library Pro: Search Box widget
- [doc_search] shortcode
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.