Check for specific levels | WordPress.org

[ad_1]

Hi, in an earlier thread i was told to do this which i finally got to work:

As an easier/simple fix for this, I would recommend replacing the first line:

if (!is_user_logged_in()){

with

if (!is_user_logged_in() || !pmpro_hasMembershipLevel()){

Now can i choose which levels to show the page to or does it only work with any level in general.

For context id like to have a “Free” level but in this coding it allows ANY user with a level to see. So how to be specific?

i tired codes like pmpro_hasMembershipLevel(array(‘Member’, ‘Staff’)); but it breaks the page.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer