How to release content in wordpress after X days of user registration

0

I'm developing a membership area on Wordpress, and I need to limit access according to the user's registration date. I already have the registration date and I already have the amount of days that the user is registered using the php Diff function.

Example:

User registers today and has access to page X, he can only see the page Y after 10 Days, if he has fewer days, I display an error message and with 10 days or more, I release the page

It can be a plugin, no problem.

    
asked by anonymous 14.12.2016 / 20:25

1 answer

0

You will add in the database the date that the user has registered, and create for each page a validation that takes the current date and compares with the date of registration.

If ($ days Entered > $ days to Display) { Include 'yourPage.php'; }

This is the basic idea, in your case just add in the database the moment he accessed the particular page

    
14.12.2016 / 20:58