The purpose of content restriction is to display specific elements on your WordPress site only if the user is logged in and/or has the subscription with the service level that grants access to the content.
1) Configure a Site Element to be Protected by ProAbono Access Restriction
- Start by selecting a page where you want to restrict content.
- Add the “shortcode” module to the page, which will be used to protect specific content.
2) Add the ProAbono Shortcode
- Now you can place the ProAbono Shortcode [ProAbono-content-restriction referencefeature=”][/ProAbono-content-restriction].
- In the opening tag: [ProAbono-content-restriction referencefeature=”], you can see that you can add the reference of a ProAbono feature (ReferenceFeature).
- Add the reference of the feature that grants access to the content.
In this example, it’s a link to a YouTube video that is protected by the ProAbono shortcode.
Thus, without the presence of the feature in the customer’s subscription, they will be unable to access this content. It is protected.
3) Test the Content Restriction
Create an account on your WordPress site using a private browsing tab. This way, you can test your account creation process and access to protected content.
ProAbono displays a message to inform the user that they cannot access the content on your WordPress site’s page. They are prompted to log in if they haven’t already or to change their subscription if their current subscription does not grant them access.
In this example, the user is not logged in and therefore cannot access the YouTube video.
In this example, the user is logged in but does not have the necessary subscription to access the YouTube video.
By default, the message displayed when the customer does not have access to the content is as follows:
“This content is only accessible to paying customers. Subscribe or change your subscription.”
Note: You may notice the ProAbono widget appearing when the user is logged in. This is their access point to view their subscription details, change offers, update billing and payment information, or download invoices.If the customer does not have a subscription, they can also subscribe directly through the widget.
In this example, the user is logged in and their subscription does have the feature that grants access to the YouTube video.
With the correct subscription, the user can finally access the protected content.
4) Customize the Display of the Content Restriction
The messages are customizable, and you can modify them at any time in the ProAbono plugin configuration.
- Click on the ProAbono extension.
- Click on “Settings” to open the configurable elements of the extension.
- You will find the customizable elements in the “restriction settings” section.
- Remember to save your changes.