WP File Download: Files and Categories
- 1. First step in the file manager
- 2. Manage file categories
- 3. Manage files
- 4. Add a category in your content
- 5. Manage single file
- 6. Update a file
- 7. File access and management limitation
- 8. File download statistics
- 9. File Upload Form
- 10. Shortcode generator
- 11. Blocks in Gutenberg
1. First step in the file manager
First things first: you can manage all files from the WP File Download side menu in your admin dashboard on WordPress, or by using the editor button. There is no difference, except for the fact that using the side menu gives you more space to work because the interface uses the full width.
As soon as you install WP File Download you also get an editor plugin displayed in your Gutenberg editor. Click on it to open the main WP File Download view.
Gutenberg is the default editor in WordPress now, so you can take refer to 11. Blocks in Gutenberg.
Click on the WP File Download button to open the file manager in a lightbox.
The interface is exactly the same as in the WP File Download's side menu view. The only difference is that the interface occupies less space.
2. Manage file categories
In order to create a category, click on the + New orange button in the top-left of your file editor.
To order categories, you need to hover your mouse over the folder icon. Drag and drop vertically to define the ordering, and horizontally to define the level. This is exactly like in the native WordPress menu system.
You can expand the category like an accordion. Global parameters can be used to set the default state: either all expanded or all collapsed. Look for the close categories option in WP File Download's configuration. To change the state from the editor you can click on the arrow buttons on the left side of each category.
3. Manage files
To add files to a category, choose a category and then drag and drop files in the middle. You can also click on the Select files button instead.
Either way, select one or more files to upload. The uploader is HTML5 powered, so you can even send big files, which will be uploaded normally. The only limit you have is defined by your server's configuration.
Apart from using drag and drop to upload, you can also use this behavior to reorder files. WP File Download saves changes automatically!
Once a file has been uploaded to WP File Download, you can make single and multiple file selections by clicking on files. You can select several files by pressing and holding Ctrl (on Windows) or Command (on Mac). The first method to move or copy files is to again use drag and drop. Drag and drop alone will move the files, and drag-and drop while pressing and holding Ctrl (on Windows) or Command (on Mac) will copy the files.
You can use the buttons on top to manage files, such as cutting, copying and pasting. From this toolbar, you can also download files.
- File size
- Date added
- Date modified
Display file counts in categories on admin
To display file counts in categories, you first need to enable the File count option in WP File Download > Configuration > Main setting > Admin tab.
After that, you can see the number of files in categories on the right.
When you choose or edit a file, you can use the Multi category field in the right panel to add it to multiple categories. Use this option to better organize files that can belong to multiple categories.
4. Add a category in your content
In order to insert a file category into your content, open a page, post or any other WordPress content and click on the WP File Download button. You can select a category from the field that appears.
Click on the Insert this category button in the right column.
The file category will appear in your post or page instead of the grey area.
Save your content and it should be displayed in the public-facing frontend.
The first time you insert your category in your content, you need to save the page and post. However, you can then manage the category's files or subcategories without having to refresh or save the content.
If you click back on the WP File Download grey area in your content, and then on the WP File Download button, you’ll simply reopen your file category so you can choose a new one.
Save your page or post and you're done: you have successfully added a category of files and its subcategories to your WordPress content.
Please go here if you are using the Gutenberg editor.
Other display options
You also have the option of inserting a category of files or a single file into your WordPress content using a shortcode. In order to use shortcodes for categories, you have to enable this feature from the Main setting > Admin tab: look for the Display shortcode in category option.
You can get your shortcodes from WP File Download, either from the category view or the file view from the right sidebar.
Additional options are available, like file pagination. If you have a massive amount of files you can add pagination so that your WordPress content loads faster and is easier to digest for your readers.
File pagination can be enabled and configured from the Main setting > Frontend tab.
Open PDF in browser
Finally, you also have an option to open the PDF in a new tab instead of downloading it. You can find this option in the Frontend tab too.
5. Manage single file
Managing single files has never been so simple. With a single click of a button, you can set up the file options and insert files into your WordPress posts or pages.
WP File Download allows you to define the following for each file:
- File type
- Remote URL
- Published on
- Expiration date
- Multi category
- Tags (for the file search engine)
- Custom icon
- Button colors (configurable from the Icons Builder > Single file tab in WP File Download's configuration)
The file will appear in your content with a single file icon.
A file is added as a button in your content:
Moreover, each file has its own direct link, which you can use to share it more easily. You can find the URL at the bottom of the right panel.
Please visit here for more information about the single file block design.
You can set the expiration date for a file, which means that the file will not visible on the frontend (as a single file or a file in a category) after that day.
6. Update a file
In order to update a file, just open WP File Download, click on the file of your choice and use the Send a new version button in the right column to replace the file.
You can change the file format, size or anything else. WP File Download detects every single change and replaces the file The plugin includes a versioning system, so that each time you update a file, the old version is stored and listed above.
You can use this feature to restore a previous file version or to delete old file versions.
7. File access and management limitation
WP File download has a lot of tools to limit file visibility and management for the admin side. First, we need to make a distinction between:
- File visibility, or who is able to view and download the files on the public side
- File management, or who is able to add, remove and edit files and categories
With WP File download you can limit the visibility of categories of files by WordPress user group. Open a category of files and make it private by selecting a user group or a single user. Then, click on the Save Settings button and you're done.
You can also limit the file visibility for a single file for a few users, so that only those selected will be able to view the file.
In order to use this feature, you should enable the Single user restriction option from the Configuration > Main Setting > Admin tab.
Similarly, you can set the visibility for a category for single users. That means that when the Visibility option is set Private, only a particular user can view the category on the frontend.
For example, you can set the "Manager" user to view the "New category user" category on the frontend.
From now on, the Download files and Preview files option are available in each user role, you can restrict users to download or preview on the frontend by roles.
For example: In this case of Editor role, once the options are enabled, users who granted an Editor role can download and preview files. It would be one of them depending on your settings.
File management in WP File Download is defined by WordPress user roles. You can choose those roles that can execute some specific actions. All the users having the selected user roles will have the same authorizations regarding file management.
To configure the access use the WP File Download > Configuration > User Roles menu:
After the user is logged in, they will inherit their group privilege to manage files.
Manage personal user file repository
WP File Download allows you to let your WordPress users manage their own files repository because you can define, as an admin, who owns a category of files.
The first step is to set up the user's role to only "Edit own category". Disable the "Edit category" option because users should not be able to edit all existing categories in this example, but only their own categories. The other privileges are not mandatory, depending on what you want to allow.
Then you can create a file category for your users, or if "Create category" is enabled in their user role, they will be able to do that themselves. Then, from the file category you've created, you can define who owns the category and therefore who will be able to edit it.
You can assign one user owner per category.
Furthermore, a user can give permission for a category or a file if the "Edit permissions settings" option is enabled in their user role. That means that they can select a user for a category or multiple users for a file, like in the previous step.
8. File download statistics
WP File Download comes with a dashboard showing download statistics, accessible from the WP File Download > Statistics menu.
The dashboard will help you to get download details about the files available on your website. From the top, there's a chart and you can filter by
- File category: include one or several categories
- Single file: include files one by one in the statistics calculation
- Download per users: select users who downloaded files
- Filter by date range (date when files have been downloaded)
At the bottom of the page, you can also view details about downloaded files or use the search engine to filter the results.
Furthermore, you can export the download statistics as a .csv file by clicking on the Download icon below the Apply Filter button.
9. File Upload Form
From the public side of your WordPress website, you can allow users to upload files into a pre-defined category. To set this up, first access WP File Download > Configuration > Shortcodes and choose a category where you want users to upload files.
Copy and paste the shortcode displayed at the bottom of this page into your WordPress editor where you want the upload form to show on the frontend.
Users should login to be able to upload their files. If users do not login, a login form will appear, prompting them sign in before uploading files.
If the visibility of the category is already public, you're done!
However, if you want to choose some selected user groups to upload files on the frontend, you should set two permissions for them. Here is one for the "Author" role, for example:
- Visibility: for the selected category, choose "Private > Author".
- User roles: in Author section, enable the "Edit own category" option.
10. Shortcode generator
You will find the Category Shortcode Generator in the WP File Download > Configuration > Shortcodes tab.
A shortcode generator is available to load a custom selection of files. The available shortcode options and filters are:
- Category: select one or all categories
- Ordering: ordering, type, title or description, size, version, date or hits
- Ordering direction: Ascending/Descending
- Max file number
- Show categories
After choosing those options, the shortcode should be, for example: [wpfd_category show_categories="1" order="created_time" direction="asc" number="10" ]
11. Blocks in Gutenberg
You can display your files or categories in the Gutenberg editor. To display categories and files, look for two WP File Download blocks: WP File Download Category and WP File Download File.
In order to display a category in the Gutenberg editor, click on the WP File Download Category button in the Widgets section. There, you will find a dropdown menu. Select the category that you want to show on the frontend.
The workflow to display a file is similar. Click on the WP File Download File button in the Widgets section and then press the Browse Files button to choose your file.