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

  1. isherry2012
    Posted 3 years 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).


    Can someone help?


  2. shazdeh
    Plugin Author

    Posted 3 years 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

  • Menu Item Visibility Control
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic