How to display the WordPress user who created the document
Document Library Pro has a 'Document author' field which you can use to display the author of each document, allow users to filter by author, and so on. This is a custom field in the plugin, and is different from the 'Author' field which is part of WordPress itself.
This article explains how to use the author field which stores the WordPress user who uploaded the document.
How to view, add and edit the document author
When you add a document, the built-in Author field will automatically be populated with the details of the user who created it. You can view or edit this as follows:
- In the WordPress admin, go to the main Documents page and click to edit a document.
- Open the 'Screen Options' panel at the very top of the 'Edit Document' screen and tick the 'Author' box.
- Now scroll to the bottom of the page, and you will see the Author field. Use the dropdown to change the user who is associated with the document.
How to display the document author
To display the WordPress user associated with each document, simply add
author to the list of fields that you wish to display in the document library.
How to list documents added by a specific user
author shortcode option displays documents uploaded by a specific WordPress user. Use the author ID or a list of IDs.
Can I filter by author?
The only way to allow users to filter the document library by a specific WordPress user/author is by displaying the author column and making it clickable. That way, users can click on the name of an author in order to filter the table to only display documents added by that author. In order for this to work, you must enable the Search on click feature and disable lazy load.
It is not possible to add an 'Author' filter dropdown above the list of documents. If you want to do this then we recommend you use the 'Document Author' field instead, which can be displayed as a filter dropdown.