WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Replace Menu for registered users (4 posts)

  1. Mex Ale
    Member
    Posted 2 years ago #

    Hi,

    My website is basically internal employee website. Hence I want to show different menu for the logged-in users.

    Example

    >>Visitor Menu
    ------------------------------------------------
    Home | Register Now | Contact us
    ------------------------------------------------

    >>Logged-In User Menu
    ------------------------------------------------
    Dashboard | Tutorials | Resources | Contact TM
    ------------------------------------------------

    I had tried to search through different topics but couldn't found any plugin or a proper solution to do that.

    I had also created two menus one for the Logged-in and one for the general visitors.

    I would really appreciate if I could get some help on it.

    Thanks

    For ref website is :

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    http://codex.wordpress.org/Function_Reference/wp_nav_menu#Different_menus_for_logged-in_users

    Here is the concept in a nutshell.... you would need to register 2 nav menus (minimally) in functions.php, and the conditionalize the display (In your template where the menu is called - most likely header.php) to call one or the other depending if a user is logged in

  3. Mex Ale
    Member
    Posted 2 years ago #

    Thank Rev... Fixed and its perfect now.
    I made two menus and inserted the Function snippet.

    :)

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    I'm glad that worked for you!

Topic Closed

This topic has been closed to new replies.

About this Topic