• Does anyone know how to output the logged in user’s name into the navigation menu or show “My account” when no user is logged in? I know the get_currentuserinfo() function can get a bunch of user data but how would I incorporate this into the menu? As far as I know you cant put code into the navigation menu label. Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Does it have to be in a menu item itself, or could you create a hook in the theme where you’d want that info to display, and add the info there, i.e.:

    <div class="nav-containter">
    <?php wp_nav_menu( $args ); ?>
    <?php do_action( $tag ); ?>
    </div>
    Thread Starter TheEpicOne

    (@theepicone)

    Well, I would like the info to be displayed in the menu so that after you hover over it, you get the options “my profile” and “sigh out” which are both menu items that link the user to a different page. If there is another way to do this then I am open to suggestions however this field has to be somewhere in the header of the page and not in the body. Thanks for replying though!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WordPress Menu’ is closed to new replies.