Wondering if anyone has a snippet for a condition for checking membership level within memberpress and show elements based if part of that level?
J
Wondering if anyone has a snippet for a condition for checking membership level within memberpress and show elements based if part of that level?
J
Did you ever get a resolution to this?
From MemberPress docs… the functions to check whether a member is either part of a specific membership or is allowed by a specific rule are…
current_user_can('mepr-active','rules:123')
current_user_can('mepr-active','membership:123')
Where 123 would be the ID of either the rule or the membership product
Awesome, thank you. I just saw that after I sent this message. Nonetheless, it’s appreciated as it will surely help someone else. =)
Thanks again.
No. I ended up using Oxygen builder.
Here’s the dynamic tag used for this sort of thing for anyone else looking:
{echo:current_user_can('mepr-active','memberships:123')}
{echo:current_user_can('mepr-active','rules:123')}
Change 123
to the appropriate ID for your use case.