Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of pmpro_hasMembershipLevel() usage
<?php
//You may either create a function or place this code in a custom page template.
//Find more here -> https://www.paidmembershipspro.com/documentation/content-controls/require-membership-function/
if( is_user_logged_in() ){
if( pmpro_hasMembershipLevel( 'silver' ) ){
//show this for 'silver level'
echo 'show this for silver';
}
if( pmpro_hasMembershipLevel( 'gold' ) ){
echo 'show this for gold';
}
}
@samuelstevens9
Copy link

samuelstevens9 commented Nov 9, 2017

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment