• FadingMusic

    (@fadingmusic)


    Hi there,

    I’m looking for a way to move the Howdy(user) drop down menu from the admin bar to my header menu. I’ve tried to google it, but I couldn’t dig up the exact question I have.

    Can someone please help me find a way to do this?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • satishpandit

    (@satishpandit)

    can you explain me or clear it what you want??

    Thread Starter FadingMusic

    (@fadingmusic)

    I’ll try…

    I wish to implement the user drop down menu from the upper right corner of the admin bar in the header menu of my theme.

    Moderator bcworkz

    (@bcworkz)

    To actually use the user drop down of the admin bar, you would need to use the entire admin bar. You can remove the other elements so only the user drop down remains. This could be done selectively for only front end menu bars if desired. See Class_Reference/WP_Admin_Bar. Related functions are defined in wp-includes/admin-bar.php.

    The abbreviated bar could be reduced in width by applying some custom CSS. I honestly would just replicate the drop down behavior with some custom code instead of involving the entire admin bar functionality.

    Thread Starter FadingMusic

    (@fadingmusic)

    Thank you for your reply bcworkz.

    I guess I’m better of replicating the drop down menu.
    I feel like it looks nicer to have a menu item with avatar and all the selectable items of buddypress in it.

    Well, better get to it then. ??

    Moderator bcworkz

    (@bcworkz)

    You can get the avatar with get_avatar(). Between the generated HTML and the menu node setup (starting line 175 of admin-bar.php) you should be able to exactly replicate the dropdown.

    I’m not sure where the buddypress elements come from, but digging in the plugin code should yield something, though just having the HTML is half of it. To find applicable plugin code, use grep (or equivlent) to locate “->add_menu(“.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Admin Menu to Header’ is closed to new replies.