Show or Hide Content Based on a MemberPress plugin Rule
<div><?php
if(class_exists('MeprRule'))
{
if(MeprRule::is_protected_by_rule(279))
{ the_field( 'cta_video_embed' ); //for non-members
}
else
{ the_field( 'premium_embed' ); // for members
}
}
?></div>
An alternate way to show a video based on membership access is this:
<div> <?php if(MeprRule::is_allowed_by_rule(279)): the_field( 'premium_embed' ); endif; ?> </div>
MemberPress Login Logout Link
Add the following code snippet to your theme template file
<?php echo do_shortcode("[mepr-login-link]"); ?>