ThemeNcode Docs

Individual File Access

Estimated reading: 3 minutes

The first tab is Restrict Individual Files, You can select any file or upload a new file from this interface and then set up access settings for the selected/uploaded file. Please remember, if a file has access settings assigned at an individual level, that’s the setting the file will use. Especially The ‘Require Login for This File‘ field controls most of it. So, If you want individual file settings to be ignored for any file, make sure you uncheck the ‘Require Login for This File‘ field.

However, Let’s do a test setting:

Once you’re on the page, Click on the button that says Upload or Select a File

It will bring up the media library, select any file you want to manage access for, and click on the ‘Select This File‘ button in the bottom right corner of the popup window

The page will now display additional fields to set access for the selected file.

1. Require Login for this file: Check if you want this file to be only accessible by Logged in users. Users who are not logged in will get a 404 error when they browse the file URL

2. Restrict By: You can restrict files by Users, User roles, WooCommerce ( if enabled ), and Paid Membership Pro ( if enabled). Select the one that you want to use.

3. Access Type: This setting is related to the next 2 settings (User Roles and Users). This field will tell those fields about what to do with their data.
If you choose to allow it here, the roles and users you assign on the next 2 fields will have access to this file.
If you choose to disallow here, the roles and users you assign on the next 2 fields won’t have access to this file.

4. Select User Roles: Select the roles that should or should not (based on the access type above) have access to this file

5. Select Users: Search and select the users that should or should not (based on the access type above) have access to this file. You can search by user’s id, name, email, etc.

6. Select WooCommerce Products: Purchasing any of the selected products will allow or disallow access to this file.

7. Select Paid Membership Pro Levels: Users with any of the selected Pmpro levels will be allowed/disallowed.

Once you’re done setting up the restrictions for the file, hit Save Changes and you’re all set! Test the file on your browser and it should have the restrictions applied.

Leave a Comment