ERI File Library
Settings
Navigate to Files > Settings.
General
- Admin Menu Label: We appreciate flexibility and customizations, so we have made it possible for you to change the existing menu label (Files) to whatever you want.
- No Access Message: Requirements can be set up on files to require specific roles or a meta key to download them. If no requirements are set, everyone (including logged-out users) can download them. If requirements are set and the user does not meet the requirements, this message will display instead. HTML is allowed.
- Additional Taxonomies: You can optionally add existing taxonomies here by including their slugs in lowercase separated by commas (e.g. category, post_tag).
Formatting
- Add Text Before Titles: Include text you want to add before the titles on links and buttons. This is referred to as "pre-text".
- Add Text After Titles: Include text you want to add after the titles on links and buttons.. This is referred to as "post-text".
- Remove File Format from Links & Buttons: Does just what it says.
- Example Text: This just shows how the link will appear with the pre-text, post-text and format.
- Admin Page Shortcode Type: Change the shortcode "type" parameter on the admin list page for easy copy-and-paste.
- Icon Type: Change the icon used on
"button"
,"post"
, and"full"
display types.
Structure
- Folder Name: If left blank, this will default to
"erifl-files"
. Your files are stored here:https://example.com/wp-content/uploads/{folder-name}/
.
Note that changing the folder name will also change the URL path of all the ERI File Library files. The links displayed on the front end using the[erifl_file]
shortcode will be changed automatically, but if someone is using a direct link to a file, it will no longer work for them. - Include URLS in Links: By default, links use
#
as the URL to conceal the file path. Users must click the links to download files, which ensures downloads are tracked. Enabling this setting will display the full file URL in the link, allowing direct file access. However, if users right-click and save the file, the download will not be tracked. This option is intended for those who use the plugin primarily for file organization rather than tracking.
Tracking
- Enable User Tracking: Logs each download for you to see which users downloaded them with timestamps. Enabling this setting will add "Downloads" and "Report" pages under Files. Disabling this after already logging some data will not result in the data being lost; instead it will simply pause tracking and hide the "Downloads" and "Report" pages.
- Delete User Tracking Database Table on Uninstall: By enabling tracking above, a table is created called
wp_eri_file_library
(assumingwp_
is your database's prefix). This setting will delete the entire table with all of the tracking data when you uninstall the plugin. It is recommended to keep this disabled until you are absolutely sure you do not want the user tracking data anymore. There might be a time where you need to temporarily uninstall the plugin to test issues on the site, so you certainly don't want to delete anything in the process.
Adding a New File
Navigate to your Files > Add New File.
- Add Link Text: The title of the file that people will see on the link. If this is blank when you upload a file, one will be created for you based on the file name.
- File URL: This is where you will upload the file. Any special characters in the filenames will automatically be replaced with underscores (
_
). Once uploaded, the full path to the file will be provided instead of just the directory. - File Description: The description of the file can be used with different types of download links:
"full"
,"post"
,"description"
. Alternatively, if you are not using them for people to see, you can still use the description to make notes about the files. - Download Requirements: Optionally set requirements for your users to be able to download this file. If no roles or meta key are required, then everyone (even logged-out users) can download it. The meta key option is for developers, and the value must be
1
. - Download Count: This shows the current download count. Changing this does not affect the tracking records in the database table; it only affects the download count displayed with the shortcodes.
- Instructions: The file can be displayed a number of ways using a single shortcode: [erifl_file id="" type=""]. See the Displaying/Sharing Files section below for details and examples.
- Where Used: Clicking the button will bring up a list of pages where the shortcode is used.
- Resource Types: The primary category of the file where you can set an image for the type of file it is, which will be used in the "post" display type if no featured image is provided. This is different from the Formats taxonomy, which is set automatically based on the file extension. The slugs are included as classes on the download link element so you can use custom CSS to change the appearance of specific resource types.
- Target Audiences: This is available for organizing files for the intended recipients.
- Featured Image: You can provide a featured image for the file, which will be used on the "post" display types.
Displaying/Sharing Files
Files are displayed on the front end of your site using shortcodes. Shortcodes are simple placeholders that you can add to pages, posts, or widgets to dynamically display download links or file lists. Below is a list of available shortcodes and how they are displayed on the site.
File Shortcode: [erifl_file id=""]
Parameters:
- id (optional): The File ID. If omitted, you must dynamically retrieve it using
custom_field
. - type (optional): Defines how the file will be displayed (e.g.,
"link"
,"button"
,"full"
,"post"
,"icon"
,"title"
,"description"
,"count"
). Defaults tolink
. - title (optional): Overrides the title.
- ignore_pre_post (optional): Set to
true
to remove pre-text and post-text from the title. You can also modify them site-wide in Settings. - desc (optional): Overrides the description.
- formats (optional): Overrides the formats. You can also remove them site-wide in Settings.
- icon (optional): Overrides the icon. Accepts a URL for a custom icon or one of the following options:
logo-full
(Logo Full),logo-file
(Logo File Only),fa
(Font Awesome),uni
(Unicode). - custom_field (optional): A meta key containing the File ID for dynamic retrieval from the current post.
- start_count (optional): Sets the starting count instead of
0
(e.g.,100
). - classes (optional): Additional CSS classes for the link element (separated by spaces).
- default_img (optional): A URL for a default image in the
post
display type when no featured image is available. - dlc (optional): Set to
false
to hide the download count in thepost
display type.
"Link" Display Type
A simple text link using the default pre-text ("Download ") and post-text ("!"), with formats enabled.
[erifl_file id="1762" type="link"]
"Button" Display Type
Button links add the icon, which you can also override directly from the shortcode.
[erifl_file id="1762" type="button"]
[erifl_file id="1714" type="button" icon="/wp-content/uploads/2025/03/chart.png"]
"Full" Display Type
Includes the text link and format plus the icon and description.
[erifl_file id="1762" type="full"]
"Post" Display Type
Displays all of the information available similar to a "post" archive. If a featured image is uploaded, then the image will use that first. If no featured image is provided, then it will check for a Resource Type image, which can be uploaded in the Resource Types section. The Resource Type must be selected on the file to use it. If no Resource Type is selected or the Resource Type does not have an image, then it will default to the icon.
[erifl_file id="1714" type="post"]

[erifl_file id="1715" type="post" dlc="false"]

Download Employee Onboarding Guide! - (docx)
[erifl_file id="1762" type="post" ignore_pre_post="true" start_count="100"]

Product and Service Overview - (pdf)
"Icon" Display Type
Displays the link as just the icon. You can still download the file by clicking on it.
[erifl_file id="1762" type="icon"]

"Count" Display Type
Displays just the download count with nothing else. There is no way to download the file from here. It is meant to be used separately if you want to build a custom display.
[erifl_file id="1715" type="count"]
"Title" Display Type
Displays just the title text with nothing else. There is no way to download the file from here. It is meant to be used separately if you want to build a custom display.
[erifl_file id="1762" type="title"]
"Description" Display Type
Displays just the description with nothing else. There is no way to download the file from here. It is meant to be used separately if you want to build a custom display.
[erifl_file id="1762" type="desc"]
Other Shortcodes
Top Downloads Shortcode
See your top downloads. You can change the display type in the shortcode. You can change the quantity, which defaults to 10 if nothing is provided.
[erifl_top_downloads qty="15" type="link"]
-
Employee Onboarding Guide (docx)Downloads: 37
- Downloads: 23
- Downloads: 13
User Download History Shortcode
Displays all of the current user's downloads. You can change the display type in the shortcode. Must have user tracking enabled to use it.
[erifl_user_download_history type="link"]
File Lists
List files in various ways with pagination. This shortcode allows you to display files based on specific filters. If you provide file_ids
, the shortcode will only pull those specific files and ignore other filters like resource types, target audiences, formats, and requirements.
Parameters:
- unique_id (optional): A unique ID for targeting the specific instance (e.g.,
file-list-1
). - type (optional): Defines how the files will be displayed (e.g.,
"link"
,"button"
,"full"
,"post"
,"title"
). - file_ids (optional): A comma-separated list of specific file IDs to display (e.g.,
123, 456
). - resource_types (optional): A comma-separated list of resource type slugs to filter by (e.g.,
type1, type2
). - target_audiences (optional): A comma-separated list of target audience slugs to filter by (e.g.,
audience1, audience2
). - formats (optional): A comma-separated list of file format slugs to filter by (e.g.,
pdf, docx
). - required_roles (optional): A comma-separated list of required roles to filter by (e.g.,
administrator, editor
). - required_meta_keys (optional): A comma-separated list of required meta keys to filter by (e.g.,
meta_key1, meta_key2
). - order (optional): The order of the files (
ASC
orDESC
). - orderby (optional): The field to sort by (
post_title
,date
,ID
). - per_page (optional): The number of files per page (e.g.,
10
).
[erifl_file_list type="post" resource_types="example-files" order="ASC" orderby="post_title" per_page="2"]
-
Employee Onboarding Guide - (docx)
This document is a comprehensive employee onboarding guide, covering company policies, benefits, and key contacts to ensure a smooth start. - You do not have permission to access this file.
-
Product and Service Overview - (pdf)
This PDF provides customers with an overview of our products, services, pricing, and special offers, helping them make informed purchasing decisions.