Support » Fixing WordPress » Add new item to Admin Bar

  • Hi all,

    I’ve been able to easily add new items to the Admin Bar under the parents “Appearance” or “Comments”.

    What I can’t figure out is how to add new items to the “My Account” parent item. I can’t figure out its name.

    I want the menu to be something like:
    -Edit My Profile
    -Dashboard
    -Logout
    -View all posts
    -View settings
    etc…

    What is the name of the “My Account” parent item?

    If I know its name, I can just do the following:

    $wp_admin_bar->add_menu( array(
            'parent' => 'MY ACCOUNT',
            'id' => 'edit',
            'title' => __('View all posts'),
            'href' => admin_url( 'edit.php')
        ) );

    Help appreciated!

Viewing 1 replies (of 1 total)
  • Resolved. I swear I searched before I posted this question.

    The name of the “My Account” parent item is either my-account or my-account-with-avatar if you have an avatar up there.

    WP-Snippets has all the detail you need.

Viewing 1 replies (of 1 total)
  • The topic ‘Add new item to Admin Bar’ is closed to new replies.