WP File Download: Files and Categories


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.

 

button-editor-file-download


Click on the WP File Download button to open the file manager in a lightbox.

 

file-manager-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.

Hover on the left edge of the file editor to increase or decrease the width of the editor, especially if you are working on a screen with a low resolution.

2. Manage file categories

In order to create a category, click on the + New orange button in the top-left of your file editor.

 

new-file-category

 

Note: A default category is created during the plugin installation.

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.

 

category-order

 

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.

 

category-accordion

 

Note: The maximum depth level of sub-categories is fifteen. Of course, there is no limit for the number of folders.

 

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.

 

upload-file

 

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!

 

move-file

 

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.

 

drag-drop-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.

 

copy-paste

 

You can also order all the files from a category by clicking on the column title and then saving the ordering. For example, the next image shows files ordered by size. After setting the ordering, you will observe the Ordering field in the sidebar turning green, indicating that the field order has changed.
 
file-ordering
 
 
You also have the option to click on the column title to order files by:
 
  • Type
  • Title
  • File size
  • Date added
  • Date modified
  • Version
  • Hits
 
Note that on the frontend, the files' ordering in sub-categories will be the same as the parent's ordering.
 
The column's top right option checkbox helps you clean the backend interface to focus on the main files parameters. That is, you can use this field to show only the file title and version, for example.
 
 
column-infor
 
 

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.

 

file-count-settings


After that, you can see the number of files in categories on the right. 

 

file-count

 

File multi-categories

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.

 

file-multi-category


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. 

 

button-editor-file-download

 

Click on the Insert this category button in the right column.

 

insert-category-button


The file category will appear in your post or page instead of the grey area.

 

image24


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.

 

default-theme-frontend

 

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.

 

category-shortcode-backend

 

You can get your shortcodes from WP File Download, either from the category view or the file view from the right sidebar.

 

category-shortcode

 

single-file-shortcode

 

Pagination

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.

 

pagination

 

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.

 

open-pdf


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.

 

insert-file-button

 

WP File Download allows you to define the following for each file:

  • Title
  • File type
  • Remote URL
  • Description
  • Published on
  • Expiration date
  • Hits
  • Version
  • 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.

 

image17

 

A file is added as a button in your content:

 

single-file-in-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.

 

file-url

 

Please visit here for more information about the single file block design.

 

Expiration date

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. 

 

expiration-date

 

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.

 

file-version

 

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.

 

file-versionning

 

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

 

File access/visibility

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.

 

file-visibility

 

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.

 

file-access-per-user

 

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.

 

category-user-access

 

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.

 

download-preview-files

 

File management

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:

 

user-role-files

 

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.

 

own-user-category

 

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.

 

define-category-owner

 

Note: the category owner setting must be activated from the global plugin configuration

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.

 

edit-permission-setting

 

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)

 

Files download statistics with filters and custom event for Google Analytics tracking

 

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.

The download statistics can be completed by a Google Analytics event tracker, which must be activated through the plugin parameters.

 

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.

 

upload-form-shortcode

 

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.

 

upload-form

 

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.

 

login-to-upload

 

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.

 

set-upload-role

 

10. Shortcode generator

You will find the Category Shortcode Generator in the WP File Download > Configuration > Shortcodes tab.

 

shortcode-generator

 

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

 

shortcode-order

 

  • 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" ]

 

Note: If Category is set to All, the theme will be the default theme.

 

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.

 

wpfd-category-block

 

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.

 

wpfd-file-block