With the WP Document Library add-on, you can seamlessly manage and display your WordPress documents with intuitive ease, enhancing both organization and accessibility.
In this article, you’ll learn how to set up the WP Document Library add-on.
Video Tutorial
Watch the tutorial video below for a quick walkthrough of the add-on’s features and setup process.
For detailed instructions, please continue reading the full documentation. If you still have any questions, feel free to submit a support ticket.
- Video Tutorial
- Installation
- License
- Categories
- Libraries
- Library Tags
- Add New Documents
- All Documents
- Settings
- Shortcodes
- Payment Gateway
- WP Document Libraries Widget
- WP Document Widget
- WP Document Libraries Upload Widget
- How to show document library(s)/category(s) on a Group (LearnDash Compatibility)
- How to show document library(s)/category(s) on a Course (LearnDash Compatibility)
- FAQ’s
- Changelogs
Installation
- Install the WP Document Library add-on & activate it.
- After activation, a new menu “WP Documents” will be added.

License
License keys can be found in the email received when you purchased the add-on. To activate your license, place your license key in the License Key field and click on the “Activate License” button.

Categories
Navigate to WordPress “Posts” menu and go to “Categories” submenu. Here, you can add the Name of the Category, its slug, its Parent Category (if there is one), its description, and select any libraries (already created). Finally, click the “Add Category” button. The child category shortcodes will also be available/visible for child categories.

Libraries
To create a new library for the documents, navigate to the “WP Documents” menu and then click on the “Libraries” sub-menu.
Add the Name of the Library, its slug, its Parent Library (if there is one), its description, and attach any documents (already created). Finally, click the “Add New Library” button.
Also, if the “Enable Libraries Restriction” option is checked, then 2 more fields will also become visible (“Library Password” and “Allowed User Roles”) on the Document Libraries page and Library edit page. The library shortcodes will not be available for the child libraries; they will only be available for the parent libraries (level 1 – at the top).

Library Tags
To create a new library tag for the documents, navigate to the “WP Documents” menu and then click on the “Library Tags” sub-menu.
Add the Name of the Library Tag, its slug, and its description. Finally, click the “Add New Tag” button.
After a tag is created, it appears in the tags list on the same screen. The list includes two additional columns:
- Tag ID – The unique ID of the tag. Use this ID wherever a shortcode attribute or widget option asks for a tag ID.
- Shortcode – A ready-to-use shortcode for the tag. Copy it and paste it on any page to display the documents linked to that tag.

Note: If a library or folder has no documents with tags, the tag filter on the frontend appears disabled (greyed out) because there are no tags to choose from.
Add New Documents
To add a new document, navigate to the “WP Documents” menu and then click on its “Add New WP Document” sub-menu.
Here, add the Title, Description, Document Libraries, Document Tags, and Document Image. From the Document Upload meta box, upload the file (File Upload), or if it is already uploaded, then you can select it from the media library (Select from Library) or enter its URL (URL). You can also select whether to feature/pin this document to the top of relevant libraries by checking the checkbox in the “Featured Document” meta box; this is an optional step. If the “Featured Document” meta box is checked, then the respective document will show at the top of the respective library in which it is linked/attached to the frontend user(s). Once done, click on publish.




All Documents
Navigate to the “WP Documents” menu and then click on its “All Documents” sub-menu. Here you will see all the documents you have added.

Settings
General
Here you can change the general settings.

Default Libraries Layout
You can choose the default layout style for document libraries. You can select from the following options:
- List View
- Grid View
- Folder View
Visible Columns in Selected Layout
You can choose to hide specific columns from the selected layout by unchecking their respective checkboxes. You can choose to show (by checking)/hide (by un-checking) the following columns:
- Image
- Reference
- Title
- Published
- Last Modified
- Author
- Favorites
- Downloads
- Download
Note: All disabled columns are not visible in grid view, regardless of whether they are checked or not.
Searchable Fields
You can choose which fields are searched when a user types in the search box of the document listings and the library browser. Check the fields you want to include:
- Document Title
- Document Description/Content
- Document Excerpt
- Document Tags
- Library Names
By default, all fields are enabled on fresh installations. If you uncheck all of them, the search falls back to searching document titles only.
Enable Categories Filter
You can choose to enable the categories filter for the groups and courses.
- If checked, on the group/course settings tab, the “Select Document Categories” option will become available.
- If disabled, the “Select Document Categories” option will disappear, and the “Select Document Libraries” option will appear (By Default).
Note: The “Uncategorized” category option will not appear in the filter option on the frontend of any course page, group page.
Enable Libraries Management Frontend
You can choose to enable library upload from the frontend.
- If enabled, then the “WP Libraries Upload” shortcode will show in the “Shortcodes” tab and will work on any frontend page (placed on) for all user roles.
- If disabled, then the “WP Libraries Upload” shortcode will not show in the “Shortcodes” tab and will not work on any frontend page (placed on) for all user roles.
Frontend Library Manager Roles
You can select the user roles allowed to manage libraries from the frontend. Administrators always retain access. This option will become visible when the “Enable Libraries Management Frontend” option is enabled.
Enable Libraries Restriction
You can choose to enable restrictions on libraries. When this option is checked, 2 new fields will become visible regarding “password” and “allowed user roles” in the “WP Libraries Upload” shortcode (if working on the frontend), “Libraries” sub-menu, and individual library edit page. You can set passwords and user role restrictions for individual libraries.
Global Password
You can set a global password for document library access (optional). If this text field is filled, then this password restriction will be applied to the “WP Document Shortcode #2” shortcode without the “libraries/categories” attribute ([wpdl_libraries]) and the widget (WP Document Libraries). You can view the password by clicking on the “Eye” Icon.
If this text field is empty, then this password restriction will not be applied to the “WP Document Shortcode #2” shortcode without the “libraries/categories” attribute ([wpdl_libraries]) and the widget (WP Document Libraries).

Similarly, if a library has a password set to access it, the users will be asked to enter the library’s password when they click on the library’s folder icon to access it. This restriction will be applied to “WP Document Shortcode # 2” With the libraries/categories attribute.

Global Allowed User Role
You can select the user role(s) allowed to access the document library globally (optional). If a user role is selected, then this user role restriction will be applied on the “WP Document Shortcode #2” shortcode without the “libraries/categories” attribute ([wpdl_libraries]), the widget (WP Document Libraries), and only the user role(s) selected will be able to access the library content/documents. If the “Global Password” text field is also filled, then only the selected user role(s) will be asked to enter the global password to access the library content/documents. Others will be shown the Access Denied pop-up.
Similarly, if no user role is selected, then the user role restrictions will not be applied on the “WP Document Shortcode #2” shortcode without the “libraries/categories” attribute ([wpdl_libraries]), the widget (WP Document Libraries) and all the user role(s) will be able to access the library content/documents.

Similarly, if a library has a user role set to access it, the user’s user role will be checked when they click on the library’s folder icon to access it. This restriction will be applied to “WP Document Shortcode #2” With the libraries/categories attribute.

Enable Debug Logs
You can enable this option to log license-related activities in the “Debug Logs” tab. When this option is enabled, a new tab “Debug Logs” will become visible.

Shortcodes
WP Document Shortcode #1
Place the shortcode on the page where you want to display the list of all WP Documents, in the form of a table.

Attributes
You can use the following attributes to preset how the document table loads:
1- [tag attribute]
Show only the documents that have the specified tag(s).Provide tag IDs or slugs separated by commas.
2- [library attribute]
Show only the documents attached to the specified library(s). Provide library IDs or slugs separated by commas.
3- [sorting attribute(s)]
Set the default sorting of the table, such as the column to sort by and the order (ascending/descending). Accepted values: [list values].
4- [pricing attribute]
Preset the pricing filter to show [free / paid / all] documents. Accepted values: [list values].
5- [search attribute]
Preset the search field with a keyword, so the table loads with the search already applied.
Example: [wpdl_document_shortcode [attribute]=”[value]” [attribute]=”[value]”]
placeholder – Customize the placeholder text shown in the search field. If not provided, the default “Search Documents…” is used.
Example: [wpdl_document_shortcode placeholder=”Find a file…”]
This is how the page will look on the front end.

WP Document Shortcode #2
Place the shortcode on the page where you want to display the WordPress document libraries.

Attributes
1- layout
Select the layout in which you want to display the library(s)/category(s) you want. You can choose anyone from the 3 options (list, grid, folder). This attribute will override the default layout for the specific shortcode.
2- exclude
You can exclude whichever child library(s)/category(s) of the parent library(s)/category(s) you don’t want to include. If there are many, then you can provide them separated by a comma.
3- libraries / categories
You can include whichever library(s)/category(s) you want to show to the users. If there are many, then you can provide them separated by a comma.
4- search
Select whether you want the library/category to be searchable or not. The library/category is by default searchable. You can choose anyone from the 2 options (true, false)
5- limit
You can select how many document records you want to show on a single page.
6- [tag preset attribute name]
Preset the tag filter for the libraries. Provide the tag ID(s) or slug(s), separated by commas, and the library will load with the selected tag(s) already applied. [Mention here whether users can change or clear the preset on the frontend.]
Example: [wpdl_libraries [attribute]=”[value]”]
Note: If you are using the folder view, then kindly note that the folder hierarchy must be kept in mind, as you cannot show the child library of any parent library without including its parent library ID in the “libraries” attribute. Also, the default layout of the shortcode and visible columns will be set from the “General” tab of our addon.
Tag filtering in Folder View: When a tag filter is applied to library folders, only the folders containing documents with the selected tag(s) are shown. Parent folders always remain visible, even if they have no matching documents themselves, so users can still navigate down to the matching child folder.
Tag filter behavior: The tag filter shows only the tags used by documents in the library or folder the user is currently viewing. When a user opens a different folder or switches to another library tab, the selected tag(s) are cleared automatically, so the new library always loads with its full list of documents.
This is how the page will look on the front end.




WP Libraries Upload
This shortcode will be available when the “Enable Libraries Upload” option is checked in the “General” tab. It allows administrator (always) and any other selected users of any user role to create document libraries from any frontend page (placed on). It shows a list of all the libraries already created. You can create, edit, delete, and search libraries. You can also create a new document and add it to a library.
Note: The “Password (optional)” and “Allowed User Roles” fields will become visible only when the “Enable Libraries Restriction” option in the “General” tab is enabled.

This is how the page will look on the front end.




Payment Gateway
The WP Document Library add-on integrates with Stripe, allowing you to sell paid documents and libraries as either one-time purchases or recurring subscriptions. To configure payment settings, navigate to the “WP Documents” menu, click on “Settings”, and then open the “Payment Gateway” tab.

The following settings are available on the Payment Gateway tab:
- Currency – Select the currency in which payments will be processed.
- Stripe Publishable Key – Enter your Stripe account’s publishable key.
- Stripe Secret Key – Enter your Stripe account’s secret key. Click the “Eye” icon to view it.
- Payment Mode – Choose whether payments are processed in “Test” or “Live” mode.
- Checkout Page – Select the page where the [wpdl_checkout] shortcode is placed.
- Thankyou Page – Select the page where the [wpdl_thankyou] shortcode is placed.
- Library Download Page – Select the page where the [wpdl_library_downloads] shortcode is placed.
- User Dashboard Page – Select the page where the [wpdl_user_dashboard] shortcode is placed.
Webhook Configuration
The Webhook Configuration section lets your site receive real-time updates from Stripe about payments and subscriptions. Copy the Webhook Endpoint URL and add it as a webhook endpoint in your Stripe account, then copy the signing secret from Stripe and paste it into the “Webhook Signing Secret” field.

Here are the steps to set up the webhook on the Stripe side:
1- In your Stripe Dashboard, navigate to Workbench > Webhooks, and click on the “+ Add destination” button.

2- Under “Select events”, choose “Your account” as the Event destination scope, and select the appropriate API version.

3- Search for and select each of the following events, then click “Continue”.

Events To Subscribe:
- payment_intent.succeeded
- payment_intent.payment_failed
- customer.subscription.created
- customer.subscription.updated
- customer.subscription.deleted
- customer.subscription.trial_will_end
- invoice.paid
- invoice.payment_failed
4- Choose “Webhook endpoint” as the destination type and click “Continue”.

5- Paste the Webhook Endpoint URL (copied from the Payment Gateway settings tab) into the “Endpoint URL” field, give the destination a name, and click “Create destination”.

6- Once the destination is created, copy the “Signing secret” shown on the destination’s overview page, paste it into the “Webhook Signing Secret” field on the Payment Gateway settings tab, and click “Update Settings”.

Selling Paid Documents & Libraries
Once the Payment Gateway is configured, you can enable pricing on any document or library from its edit page, under the “Pricing Settings” meta box.
1- Check the “Enable Pricing” checkbox, then choose the “Pricing Type”: “One Time” for a single purchase, or “Subscription” for a recurring billing plan.

2- If “Subscription” is selected, set the sale start/end dates, and add one or more Subscription Plans. For each plan, set the Plan Name, Regular Price, Sale Price, Billing Every interval, an optional Free Trial period, and an optional “End Subscription After” duration. You can mark one plan as the Default Plan.
WP Document Library – Subscription Plans
3- The Pricing Settings meta box appears alongside the regular Document Libraries meta box on the document/library edit page. Once configured, click “Publish”.

On the frontend, the document/library will display its price and a “Buy Now” button to users.

When a user clicks “Buy Now”, they are taken to the checkout page (using the [wpdl_checkout] shortcode) to complete payment.

After a successful payment, the user is redirected to the thank-you page (using the [wpdl_thankyou] shortcode), where they can view their order details and download their purchased content.

Users can manage their subscriptions – viewing renewal/trial-end dates and cancelling active plans – from the “Subscriptions” tab of the user dashboard (using the [wpdl_user_dashboard] shortcode).

WP Document Libraries Widget
To add the document library widget, first navigate to any page and search for a widget by the name “WP Document Libraries” in the block editor. Here you can select from the following options to display the respective libraries you want to show to the users:
- Layout
You can select from the options (List, Grid, and Folder).
- Items per page
Select how many documents should be visible on a single page.
- Enable search
Enable the toggle if you want users to be able to search the document by entering its name.
- Limit to libraries
Select which libraries should be visible on the frontend to the users by their names.
- Limit to categories
Select which categories should be visible on the frontend to the users by their names.
- Categories/Libraries IDs to exclude
Select which libraries/categories (including child libraries/categories) should not be visible on the frontend to the users by their respective library/category ID(s).


The block editor sidebar also includes a “Lock Navigation” toggle. When enabled, it prevents users from navigating to or viewing parent or sibling libraries, restricting them to only the selected library’s child libraries and documents.

WP Document Widget
To add the WP document library widget, first navigate to any page and search for a widget by the name “WP Document” in the block editor. It will work like the “[wpdl_document_shortcode]” shortcode on the frontend.

WP Document Libraries Upload Widget
To add the document library widget, first navigate to any page and search for a widget by the name “WP Document Libraries Upload” in the block editor. It will work like the “[wpdl_libraries_upload]” shortcode on the frontend.

How to show document library(s)/category(s) on a Group (LearnDash Compatibility)
Here are the steps to show the library(s)/categories on a respective group:
1- Navigate to the settings tab of the respective group and enable the “Enable Document Libraries” option.
2- Select the respective library(s) in the “Select Document Libraries” option or the respective category(s) in the “Select Document Categories” option. If nothing is selected, then all the document records will be visible.
3- Select the respective user roles of the users you want to be able to view the respective selected libraries/categories in the “Allowed User Roles” option. If nothing is selected, then users of all the user roles will be able to view the selected library(s)/category(s).
Note: The default layout of the “Libraries/Categories” tab and visible columns will be set from the “General” tab of our addon.




How to show document library(s)/category(s) on a Course (LearnDash Compatibility)
Here are the steps to show the library(s)/category(s) on a respective course:
1- Navigate to the settings tab of the respective course and enable the “Enable Document Libraries” option.
2- Select the respective library(s) in the “Select Document Libraries” option or the respective category(s) in the “Select Document Categories” option. If nothing is selected, then all the document records will be visible.
3- Select the respective user roles of the users you want to be able to view the respective selected libraries/categories in the “Allowed User Roles” option. If nothing is selected, then users of all the user roles will be able to view the selected library(s)/category(s).
Note: The default layout of the “Libraries/Categories” tab and visible columns will be set from the “General” tab of our addon.




Updating from Learndash Document Library
When updating from the LearnDash Document Library Version 1.0.3, kindly note that major changes have been implemented in WP Document Library Version 2.0.0, including database-related changes. Some examples of such changes are as follows:
- Previously, documents could be directly attached to the categories; now, libraries are attached directly to the categories.
- Password and user role restrictions could be assigned individually to categories; now, it is no longer possible.
- Documents can no longer be filtered on the frontend by WordPress Tags.
Note: Make sure to review all the changes made in the updated addon on a staging site before updating the plugin on your main site.
When updating, if you have decided to delete all you previously created categories, libraries, and library tags and start with a fresh installation, then click the “Delete Data & Start Fresh” button. It will delete all the database records/entries that exist in the previously including all the data from the LearnDash Document Library Version 1.0.3 addon, such as categories, tags, libraries, library tags, addon settings, and previously created documents.
Similarly, if you have decided to keep your previously created documents, then while the “LearnDash Document Library” is still activated on your site, click the “Migrate Existing Data” button, and your documents will be migrated successfully. However, as mentioned above, the database structure has been changed significantly, so make sure to link the documents with their respective libraries, library tags, and categories to see the correct number of documents on the frontend.

FAQ’s
1- Does the “WP Document Library #1” Shortcode work on any page?
The “WP Document Library #1” Shortcode will work on any page it is placed on.
2- Does the addon support Grid view on the front end?
The addon does support the Grid view on the front end for the WP Document Shortcode #2.
3- Are there any filter attributes available for the WP Document Shortcode #2?
There are filter attributes available for the WP Document Shortcode #2. The “Library Tags” filter filters documents in the selected library based on the selected tag. You can also preset the tag filter using the [attribute name] attribute, so the library loads with specific tags already selected. The tag dropdown lists only the tags available in the current library or folder. If no tags are available, the tag filter is disabled.
4- Is the document feature available on any widget?
The document feature is available in the widget as well, under the name “WP Document Libraries”.
5- Does this Add-On require any external plugin on your site to work properly?
This add-on does not require any other plugin to be activated on your site. However, we have added compatibility with the “LearnDash LMS” plugin. If you want to show the documents in the course and group page, then please make sure to enable the “LearnDash LMS” plugin on your site to view the respective options in the group/course edit page in the settings tab.
6- Which fields does the search look through?
The search looks through the fields you enable under Searchable Fields on the General settings tab: document titles, descriptions/content, excerpts, tags, and library names. If no fields are selected, only document titles are searched. When a search has multiple words, every word must match.
Changelogs
3.2.0
- New: Added Searchable Fields settings for document titles, descriptions/content, excerpts, tags, and library names, with all fields enabled on fresh installations and title-only document search when no fields are selected.
- New: Added multi-word search across enabled fields in document listings and the library browser, requiring every search word to match.
- New: Added a `placeholder` attribute to `[wpdl_document_shortcode]` and a `wpdl_search_placeholder` filter for customizing its default search placeholder.
- Fix: Updated the default search placeholder to “Search Documents…” in document listings and the library browser.
3.1.0
- New: Added tag filter presets to the [wpdl_libraries] shortcode and tag filtering for library folders, keeping parent folders visible for navigation.
- New: Added tag, library, sorting, pricing, and search presets to the [wpdl_document_shortcode] shortcode.
- New: Added Tag ID and shortcode columns to the document tags administration screen.
- Fix: Scoped available tags to the selected library or folder and cleared tag selections when navigating between folders or library tabs.
- Fix: Disabled the tag filter when no tags are available.
- Fix: Added support for tag IDs, names, and slugs in REST API document and folder filters.
- Fix: Passed document block attributes through to the document shortcode.
- Fix: Improved filter toolbar spacing, dropdown styling, and Select2 alignment, and refreshed frontend styles when the stylesheet changes.
3.0.2
- Fix: Loaded Select2 assets for library and category administration forms.
- Fix: Initialized payment fields and corrected subscription plan rendering when adding libraries.
- Fix: Removed unexpected characters, including invisible spaces, from comma-separated IDs in shortcode and REST API filters.
- Fix: Disabled Tailwind’s base style reset in library block styles to prevent conflicts with theme styling.
3.0.1
- Fix: Moved license checks to daily background tasks with an admin fallback and protection against duplicate requests.
- Fix: Cached plugin updates for 24 hours while allowing forced refreshes.
- Fix: Disabled update checks and removed update notices for missing or inactive licenses.
- Fix: Removed scheduled license checks on plugin deactivation.
3.0.0
- New: Added Stripe payment gateway support for selling paid documents and libraries.
- New: Added a Payment Integration tab to the plugin settings, allowing administrators to configure Stripe API keys, webhooks, and other payment-related settings.
- New: Added configurable payment settings for documents and libraries, allowing content to be designated as free or paid.
- New: Added support for one-time payments as well as recurring subscription plans with flexible billing intervals.
- New: Added free trial support for both documents and libraries.
- New: Added the `[wpdl_checkout]` shortcode to provide a dedicated checkout experience for users purchasing paid content.
- New: Added the `[wpdl_thankyou]` shortcode for displaying the post-purchase confirmation and order details.
- New: Added the `[wpdl_library_downloads]` shortcode to display a user’s available library downloads.
- New: Added the `[wpdl_user_dashboard]` shortcode to provide users with a centralized dashboard for managing their documents, libraries, and purchases.
- Fix: Redesigned the UI for the `[wpdl_document_shortcode]` and `[wpdl_libraries]` shortcodes for an improved user experience.
- New: Added multiple filtering and sorting options to `[wpdl_document_shortcode]` to make documents easier to find and organize.
- New: Added an admin Orders dashboard for viewing and managing customer orders and payment-related information.
- New: Enhanced the overall document and library purchasing workflow, including access management for free, paid, subscription-based, and trial content.
- New: Added support for setting a selected library as the root folder, allowing students to access and navigate the library directly without requiring access to its parent library.
- New: Added a Navigation Lock option, allowing administrators to prevent students from navigating to or viewing parent or sibling libraries.
- New: Added support for restricting students to only the selected library’s child libraries and documents when Navigation Lock is enabled.
- New: Added frontend document upload permissions, allowing administrators to grant document upload access to specific users.
- Fix: Fixed issues with library access restrictions and permission handling.
- Fix: Resolved minor UI issues and improved overall interface consistency.
2.0.4
- Fix: Improved Licensing Module.
2.0.3
- New: Updated “wpdl_libraries_upload” shortcode to manage libraries from frontend.
- New: Added controll in general settings to restrict the access of libraries management to specific user roles.
2.0.2
- New: Added block editor support for “wpdl_document_shortcode” shortcode.
- New: Added block editor support for “wpdl_libraries_upload” shortcode.
2.0.1
- Fix: Resolved security vulnerabilities and enhanced overall performance.
2.0.0
- New: Added “WP Document Libraries” block to add block directly instead of shortcode.
- New: Added favorite documents support. Users can add documents in favorites list.
- New: Added support for pinned documents.
- New: Added support to view documents on site instead of downloading.
- New: Improved UI to improve site speed and reduced usage of server resources.
- New: Added libraries support in categories.
- New: Removed documents support from categories.
1.0.3
- New: Added support for private document libraries.
- New: Added support for password and user roles to restrict libraries/categories.
- New: Added frontend upload functionality for selected user roles.
- Fix: Enhanced UI/UX for access settings and document restriction workflows.
1.0.2
- New – Added option to create the document library for specific groups.
- New – Added option to create the document library for specific courses.
- New – Added option to create the document library for specific user roles.
- New – Added three layouts for the document library with runtime layout switching capabilities.
1.0.1
- New – Minor UI changes in document shortcode.
1.0.0
- Initial Release.