WordPress.org

Ready to get started?Download WordPress

Forums

Menu Item Visibility Control
[resolved] Different Menus for Different User Roles (2 posts)

  1. isherry2012
    Member
    Posted 1 year ago #

    I have this plugin and tried it with "is_user_logged_in()" and it works great.

    But, I don't know how to write Conditions for what I need.

    I have a Public Menu available to everyone.

    I also want to reveal two additional menus based on User Role:

    "Subscriber" sees Public menu and Subscriber menu.

    "Contributor" sees Public, Subscriber, and Contributor menus (shown in Header, Sub-Header, and Footer).

    http://ellevoit.com/

    Can someone help?

    http://wordpress.org/extend/plugins/menu-items-visibility-control/

  2. shazdeh
    Member
    Plugin Author

    Posted 1 year ago #

    Try this snippet:
    in_array('administrator', $GLOBALS['current_user']->roles)
    it checks whether current user has the administrator role.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic