Updated on April 07, 2020: Modified the condition to add != operator as well. So it is now possible to check whether the current logged in user has access or not have access to a particular membership level.
This members-only tutorial provides the code to add a custom condition that returns true if the current logged in user is an active member of a specified membership level when using Restrict Content Pro in Oxygen.
Use Case Example: You have a membership level in RCP called "Premium". You have a Section in a Template/Page that should only be output on the front end for members who have paid/subscribed to the "Premium" membership.
Select the Section, click on the Conditions icon, add a new condition, select "Restrict to active members of a specific membership level (enter ID)" and specify the ID of your membership level (
1 in this case).
Once done, this Section will not be printed on the front end for users that don't have active access to your membership level.
Add a new Code Snippet.
Title: [Condition] Restrict to active members of a specific membership level (RCP)
This is a premium members-only content.
To view the rest of the content, please sign up for membership ($47/month or $499 one-time).
Already a member? Log in below or here.