Support » Plugin: Paid Memberships Pro » How to make menu items inactive if not a member of a specific level

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dirty Bill

    (@dirty-bill)

    Bump

    Plugin Author Jason Coleman

    (@strangerstudios)

    Do you mean hide menu items in the WordPress dashboard?

    You can do this by Role in WordPress and you can map PMPro membership levels to roles using code like this:

    http://www.paidmembershipspro.com/2011/10/give-new-members-author-role/

    Good luck.

    Plugin Author Jason Coleman

    (@strangerstudios)

    On the frontend, you can update your theme to have two menus, one for logged in and one for logged out.

    Would look something like this:

    if(function_exists("pmpro_hasMembershipLevel") && pmpro_hasMembershipLevel())
    {
    wp_nav_menu(  array( 'theme_location' => 'member', 'fallback_cb' => false ));
    }
    else
    {
    wp_nav_menu(  array( 'theme_location' => 'nonmember', 'fallback_cb' => false ));
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to make menu items inactive if not a member of a specific level’ is closed to new replies.