WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Different front end menu for different user (6 posts)

  1. deyelicious
    Member
    Posted 1 year ago #

    can i arrange menu in front end based on role user(when login in front end of course)?
    if user is an administrator, front end menu is HOME STUFF MODULE
    if user is guest, front end menu is HOME STUFF
    if user is author, front end menu is HOME MODULE
    please help me :)

  2. Jay Hoffmann
    Member
    Posted 1 year ago #

    The Members plugin allows you to control what different user roles have the capability to see and do. I've used it before to limit what each user can see in the admin menu, if this is what you are talking about.

    http://wordpress.org/extend/plugins/members/

  3. bcworkz
    Member
    Posted 1 year ago #

    It's easier to control what happens by capability, rather than role. You'll often need to pick a capability unique to each different role, you can always create and assign one. The Members plugin makes this easy, but it can be coded too.

    Then you just need to wrap each different menu output in a if (current_user_can('some_capability')) block.

  4. deyelicious
    Member
    Posted 1 year ago #

    @jhoffm34 : tq for quick reply but i want arrange menu in site not in admin menu..any idea?
    @bcworkz : which plugin?

  5. bcworkz
    Member
    Posted 1 year ago #

    No plugin I know of. I was suggesting hacking the menu output of your theme. Depending on how the menu is implemented in your theme, it may be possible to do from a custom plugin. A child theme is a more likely solution.

    While the admin menus have builtin capability control, the front end menus would typically not, thus you would more than likely need custom code.

  6. deyelicious
    Member
    Posted 1 year ago #

    hmm i see..
    finally i hacked the code to make new role and new front-end menu
    so now i can control my front end menu based on user role.. :)

Topic Closed

This topic has been closed to new replies.

About this Topic