WordPress.org

Forums

Paid Memberships Pro
How to make menu items inactive if not a member of a specific level (4 posts)

  1. Joe
    Member
    Posted 1 year ago #

    Is there a way to hide menu items if a member belongs to a specific level? This is a deal breaker, thanks!

    http://wordpress.org/plugins/paid-memberships-pro/

  2. Dirty Bill
    Member
    Posted 1 year ago #

    Bump

  3. Jason Coleman
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  4. Jason Coleman
    Member
    Plugin Author

    Posted 1 year ago #

    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 ));
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.