Wordpress plugin to restrict access to files only after registration

Asked

Viewed 62 times

0

I’m with a client who has a Wordpress site and wants to limit access to certain PDF files only for those who register on the site. The problem is that there are several Pdfs and the registration made by the user should be valid only for that specific PDF, not being able to see so the others, unless he asks the administrators of the site and they make the release of the new PDF.

I have installed on this site the plugin "Ultimate Membership Pro", but I did not find in it a way to limit the accesses in each record a PDF.

I wonder if it is possible this in Wordpress, via code or plugin.

2 answers

0

0

1 - Create a custom post type.

2 - Install the ACF plugin.

3 - Create a field group, called: PDF

4 - Create the rule to be shown only for your custom post type

5 - Create the fields to put the pdf, file type and a select or checkbox or radio with the values referring to the types of wordpress users...Administrator, editor, Author, Subscriber...

6 - Go to the menu of your cistom post type, create a new one, move the file up and arrow to scroll in select. Then that PDF, created record, will be referenced to a specific role.

7 - At the time of listing on the site, these files, make the normal call(loop) and make a check of the user who is logged, at that time and show only the files relating to your role, with an IF.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.