A
A
Alexander2020-06-07 21:41:54
WordPress
Alexander, 2020-06-07 21:41:54

Private access to content, implementation?

Hello. There is a site with a paid subscription through the Paid Memberships Pro plugin. Created a separate section and closed it. Now, by subscribing, you can view content from this category. Separate posts will be posted in the rubric.

The question is - is it possible to make sure that each new client who subscribes and follows the link to this category sees only new posts that will be posted from the moment his subscription is activated? And he did not see all the old posts. For example, I subscribed today, followed the link to the section with paid content, but it’s empty there, I’ll see only a new post, which will be posted, for example, tomorrow. At the same time, there are already posts in the rubric that were posted earlier, but they are not visible to him, or only the last 10 are visible, for example, and new ones will naturally also be visible. Maybe through some kind of hook there is an implementation? Or is it only necessary to modify the plugin separately for such an implementation?

PS. There is something similar in telegram channels / groups. After the introduction, the previous posts are not visible there, or only the last 100 are visible, I don’t remember how exactly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Kulikov, 2020-06-08
@anatoly_kulikov

I did something similar, the essence is something like this - you can try to do the following trick:

  1. Make an additional metafield for the user profile, where the subscription purchase date will be stored
  2. At the time of payment for the subscription, activate the function that will record the date in this metafield
  3. Using standard tools, cut off by time all published records before the date of purchase

The main thing is to figure out how to catch on to the moment of payment, and then it's easy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question