How to create files on the frontend of your site

If you’re looking to manage your file library via the front end of your WordPress site, you can do so with Filr. Allowing file uploads in this way means if you want users to upload files without having admin access, you can.

document library uploader wordpress

Step 1: Add the frontend uploader shortcode

To allow this, you’ll need to add an extra shortcode to the page you’re using to display your file library.

Note: If you’ve not displayed your Filr library yet, our How to create a library with Filr guide will show you how.

To do this, take the following steps:

  1. From your WordPress dashboard, go to Pages > All Pages
  2. Click to edit your document library page.
  3. On this page, you should see your document library shortcode (that you’ve already added).
  4. To allow site visitors to upload to this library, add the shortcode [filr-uploader] below it.
user generated document library filr shortcode

[filr-uploader] is the basic shortcode for allowing users to upload files to your library, but we can customize it in a few ways. The following parameters can be used and combined to help you create a shortcode that suits you.

user generated document library filr shortcode edit

Library parameter

If you want to specify a particular library you want users to upload their files to, you can add the library parameter to the shortcode like this:

Replace my-library with your library’s slug. Found by going to Filr > Libraries and copying the text in the Slug column of the table.

[filr-uploader library="my-library"]

Status parameter

If you want uploaded files to have a status automatically assigned to them when uploaded, add the status parameter to the shortcode like this:

Replace draft with your status of choice (published, draft, pending review).

[filr-uploader status="draft"]

User role parameter

If you want to specify which user role you want to be able to upload files to your document library, add the user-role parameter to the shortcode.

Replace subscriber with your user role of choice. You can add additional user roles by separating each with a comma.

Note: This parameter requires someone to have registered with your WordPress site.

[filr-uploader user-role="subscriber"]

User email parameter

If you want to specify who can upload to your library based on the user’s email address, add the user-email parameter to the shortcode.

Replace john@doe.de with your email address of choice. You can also add multiple email addresses by separating them with a comma.

Note: This parameter requires someone to have registered with your WordPress site.

[filr-uploader user-email="john@doe.de"]

Step 2: Customize the uploader styles and settings

Now we’ve set up your user uploader. We can customize it with a few settings.

To do this, take the following steps:

  1. From your WordPress dashboard, go to Filr > Settings and click the Frontend Uploader tab at the top.
filr uploader styles
  1. Here you can change the headline, limiter, and button labels, add a custom icon (Unicode) for the uploader and modify the branding colors to match your design.
  2. You can also activate a reload after a successful file upload. This is useful when using the uploader on the same page as the library shortcode to make the file immediately visible to the user.