in WordPress site only any three post are access then redirect to register page

Solution:

You have to create a plugin for this where you have to add logic for each user to store their activity for post with IP address and set the timestamp for the 30 days for that user. You also have to add condition while any user come to your post at that time you can compare the timestamp and IP with current timestamp and based on that you have to redirect user to registration page.

You also have to set flag for the user and IP so you can allow them to access your post if they are registered user.