1. Home
  2. Document Library Pro
  3. Document Library Options

Document folders

The folders option in Document Library Pro controls the overall structure of your document libraries.

Folders disabled

This is the default option and lists all your documents together, regardless of their category. You can disable folders on the plugin settings page, or by adding folders="false" to the shortcode, for example: [doc_library folders="false"]

Folders enabled

This structures your document library into a hierarchical folder tree structure listing the document categories, sub-categories, and so on. The tree view allows users to drill down into the document library by category.

When the user clicks on a folder, they will see a list of documents from that category and/or folders for the sub-categories. The user can then click on a sub-category to view a list of documents in the sub-category, and so on.

The folders are collapsible and only one folder will ever be open at a time. This helps to make the document library easy to navigate, so that the user never gets lost.

You can enable folders on the plugin settings page, or by adding folders="true" to the shortcode, for example: [doc_library folders="true"]

Folder status

By default, the folders are all closed when the document library first loads. You can use the folder status option to change this - either to display all the folders as open, or by specifying individual folders which will be open while the others are closed. To do this, either use the Open folders option on the plugin settings page, or the folder_status shortcode option.

To control the folder status in the shortcode, add all, none, or a comma-separated list of category ID's. Examples:

  • [doc_library folder_status="all"]
  • [doc_library folder_status="none"]
  • [doc_library folder_status="123,456,789"] - this assumes that 3 categories with the ID's 123, 456 and 789 will be open by default. You can find the category ID's by going to Documents → Categories, clicking to Edit the category, and looking for the ID in the URL in the address bar of your browser. For example, if the URL ends with /wp-admin/term.php?taxonomy=doc_categories&tag_ID=900&post_type=dlp_document then the category ID is 900.

Restyling the folder icons

Document Library Pro comes with a folder icon built-in. Top level folders are yellow, and sub-folders are black.

You can use the options on the settings page to change color of the folder icons, or replace them with your own icon.


Does it support sub-categories?

Yes, sub-categories will be indented to show the folder structure. You can have as many levels of categories as you like, and the child categories will always be nested under their parent category. Of course, this assumes that the page is wide enough to accommodate deep category structures with many levels!

If a category has documents AND sub-categories, then it will show like this:

  • Category 1
    • List of documents that are in category 1 but not any of its sub-categories
    • Category 1a name and folder icon
      • List of documents in category 1a

How are the categories ordered?

The order of the folders can be changed from the Documents → Settings → Folders subsection. Simply select the 'Sort by' factor and the direction (order) from the drop-down lists.

For the 'sort by' option, you can choose to order by name, category ID, category slug, category order (menu order), and the number of terms.  For the direction, you can set it as ascending or descending.

Can a document appear in multiple folders?

Yes, if a document is in multiple categories then it will appear in multiple folders, under each of its categories. The exception is if it is in a parent category and its child category, in which case it will only appear in the child category.

Can I add a search option to the folder view?

Yes, if you enable the search box on the plugin settings page then this will appear above the list of folders. That way, users can search within all the folders at once.

The results will appear as a flat list of documents and will not be structured into folders. Users can use the 'Reset' button to return to the folder review.

Can I exclude specific categories from the folders list?

Yes, please see our article about how to edit the shortcode to control which documents to include and exclude. This includes options on excluding specific categories or sub-categories.

Related Articles

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