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)

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($27/month).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: