2. Document Library Pro Settings
The Document Library Pro plugin settings pages (Documents → Settings) let you configure your document libraries. Use the following video and the written information below to learn about the settings and how to use them.
Enter your license key here. This is essential for the plugin to work.
Select which fields you would like to use for your documents. These fields will be displayed on the single document page, and can also be displayed as columns in the document library.
- Content - This field can be used for a description of the document, or to add the full content of the document if you want it to be available online without having to download it.
- Excerpt - Use this field for a brief summary of the document.
- Featured image - Upload an image if you plan to include an image column in the document library.
In addition to these fields, your documents will have all the standard WordPress fields such as the title, content, date, author, document categories and document tags.
If you would like to store extra information about your documents then we have provided an article about how to do this.
Use these options to choose which information to display on the individual page for each document, if you are using it.
Document Libraries tab
This tab controls how the documents are displayed on the front end of your website.
Document library page
Select which page you wish to use as your main document library page (if required).
When you install the plugin, it automatically creates a page called ‘Document Library’ and selects it here. You can select a different page if required.
The plugin will add the shortcode
[doc_library] to whichever page is selected here. It lists all your documents using the default options. You can customize these settings below.
These options set the defaults wherever your documents are listed, whether you use the main document library page or list documents using a shortcode. (You can override these using the shortcode options for each individual document list.)
Enable this option to structure your document libraries into category-based folders.
If you have multi-level categories then it will work like this:
- All the top level categories will be listed as closed folders when the page first loads.
- When a user clicks on a folder, it will open to contain a table listing the documents which are only in that top level category; with folders underneath for the sub-categories.
- When the user clicks on a sub-category folder, they will see a table listing any documents which are only in that sub-category; or they will see any sub-sub categories listed as folders underneath.
Add a comma separated list (without spaces) of the columns to appear in the table.
This option controls the size of the featured image in the image column. Enter the required image size in pixels, e.g. 50×70 will set the image to 50 pixels wide by 70 pixels high.
Ticking this option will make the featured image in the image column open in a lightbox/popup when someone clicks on it. If you untick this box then clicking on an image will link visitors to the document instead. If you wish to disable this behavior then you can do so using the clickable columns option, below.
Tick this box if you want content added by other shortcodes to appear within the columns of the table. For example, you might be adding a button shortcode to add other types of button; embedded audio or media players; icon shortcodes; etc. Alternatively, you might have added the content of a document using the Gutenberg editor and want to display the fully formatted information on the document library page.
If you are using the content column, then this option controls the number of words that will appear in the table. Enter a whole number.
If you are using the excerpt column, then this option controls the number of words that will appear in the table. Enter a whole number.
If your document library contains a
link column, then this option controls how the link is displayed in the table:
- Button (the default) - a clickable button to the document.
- File type icon - automatically displays an icon representing the file type, or a generic icon for uncommon file types.
- Text link - a text-only link.
If the link style is set to 'button' or 'text link' then you can control the text that appears in the button here. The default is 'Download'.
Choose whether other columns in the document library are clickable. The following columns can be formatted as links:
image, and any
all to add links to all possible columns,
none to disable all links, or add a comma separated list (without spaces) of the specific columns that should be clickable.
Choose what happens when someone uses the
- Direct access - this is the default and opens the document, rather than taking users to the single document page.
- Open single document page - takes users to the single document page, from which they can click on a link to the actual document if required.
Choose whether or not you would like documents to open in a new browser tab.
Loading & performance
Tick this box if you want to load the contents of the document library table one page at a time, or if you want the list of documents to load after the rest of the content on your page. This option boosts performance for big document libraries but there are some limitations, so please read the full article about lazy load.
Enter a whole number to specify the maximum number of documents that can appear in the table.
Warning: If you are not using the lazy load option then increasing this number could cause performance issues or even server crashes. For big document libraries, we recommend activating lazy load so that only one page of documents are loaded at a time. If you do this then the document limit option is not applicable.
Documents per page
Enter a whole number to control how many documents appear on each page of the table. If there are more documents than the number of rows per page then pagination links will appear linking to the other pages.
This option allows the contents of your document tables to be cached to improve performance and speed up page load times.
If you tick the 'Caching' box then you can also set the 'Cache Expires After' time to control how often the cache is cleared. Enter a whole number of hours.
Choose an option for how the documents will be sorted when it first loads. (Customers can also sort the document library by clicking on any column header in the table.)
Choose whether the documents will be ordered in ascending or descending order.
Document library controls
This option controls whether or not filter dropdowns will appear above the document library. You can add filters for document categories, tags, author or any custom taxonomy.
- Disabled – no filters will be displayed.
- Enabled – shows all possible filters based on the contents of the table. (This will only display filters if some of your columns are filterable.)
- Custom – add a comma separated list (without spaces) of which filters to add.
Positions, shows or hides the ‘Show [x] documents’ dropdown.
Positions, shows or hides the keyword search box.
Positions, shows or hides the (e.g. ‘Showing 1 to 10 of 50 documents’).
Positions, shows or hides the pagination buttons.
Choose a style for the pagination buttons.
Positions, shows or hides the reset button which lets customers reset the table after performing a search or filter.
The table styles (e.g. font size and color) will automatically be inherited from your theme.
Enable this option to override the default styling. You can change the styling of the following elements of the tables:
- External, header and body borders - color and width
- Header background - color
- Header text - color and size
- Main background - color
- Alternating background - color
- Body text - color and size
- Spacing - controls the amount of padding to add around the contents of each cell in the table
To change the color, select from the color picker or add any hexadecimal color value (e.g. #757575). To change the size, use the up/down arrows or enter the size in pixels. Tip: If you want to add an RGB color then you can use a color convertor to get the right value.
You can add more styling using additional CSS.
The plugin settings page lets you set defaults for the most widely used options. You can override these and use additional options directly in the document library table shortcode. Please see the complete list of shortcode options.
Next, it's time to start adding documents to your document library!Adding Documents