This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Using the WP DISPLAY FILES plugin, the Permission module allows restricting files for role-based permission. Admins can control which user roles can see and download files and folders on the frontend, based on whether the user is logged in or not.
How to Assign Role-based Permission to View Files on the Frontend
- Step 1: Please log in to the WordPress admin dashboard and navigate to the Add or Edit Shortcodes page.
- Step 2: On this shortcode page, scroll down to the Permission Settings section.
- Step 3: In this section, enable the Login Required? button.
- Step 4: In the same section, go to the Roles tab and select the roles you want to allow access to. You can decide whether certain roles require users to be logged in to access files/folders.
- Step 5: Enter a custom login message in the Login Required Message textbox. This message will display when a user is not logged in.
- Step 6: Save the permission settings. The selected user roles will now require login permission to view the file page.
Explore the latest in WordPress
Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.