You have to create a new array for the new item and pass the parent
parameter as the id of this already created item.
In your case, the args array should be like this:
$args = array(
'id' => 'my-item',
'title' => 'My Item',
'href' => '#',
'parent' => 'theme_page',
'meta' => array(
'title' => __('Click Me'),
),
);
This post has a complete explanation of how and where you can add items to the admin bar and the usage of the parent
parameter.
Related Posts:
- Add visit site to your toolbar instead of being in the dropdown
- Add highlighting to new Admin Dashboard Menu Item
- WordPress setting API strucked
- Show admin menu and toolbar in admin post page
- How to change menu page capability
- Why add_menu_page adds admin.php and how to remove it?
- Is there any way to add absolute path for add_menu_page function?
- Set different custom menu items for different user roles
- toolbar not visible on pages using front-page template
- WordPress add page under admin submenu and retaining the active status of the parent submenu page in the menu
- Different Admin language
- add sub_menu to a sub_menu (multiLevel sub_menu) in admin menu in wordpress
- How to remove an item from menu bar’s +New menu based on User role
- How can I place a page link to the sidebar admin bar?
- How Do I create multiple Top Level Admin Menu Pages To submit data to the options table?
- How can I modify text in admin bar?
- Settings API – Checkboxes validation in a menu with multiple subpages
- How to include the admin bar?
- WordPress admin menu formatting issue
- The Great WordPress Admin Menu Challenge of Jan 2011 (a.k.a. How to Resolve Some Challenges when Modifying the WordPress Admin Menu System?)
- Remove duplicate main – submenu in admin?
- Custom Post Type Settings page, choose page to display archive
- Plugin View Details Link
- Add an admin page, but don’t show it on the admin menu
- Getting custom admin submenu item to highlight when its active
- Add update notification bubble to admin menu item?
- Show Custom Taxonomy Inside Custom Menu
- Are there any reasons you can’t use strings for admin menu positions?
- remove_menu_page doesn’t work on custom plugin menus
- What’s the best method for emptying an option created with the Settings API?
- List table not rendering when $this->items is filled
- Modify Admin Bar Link
- Edit specific nodes in WP_Admin_Bar
- Order Admin sub-menu items?
- Admin sidebar items overlapping in admin panel
- How Can I remove or hide the export page in WordPress menu?
- Adding a menu item in the admin bar
- How to check if an admin (sub)menu already exists?
- Adding an admin page – OOP approach not working
- How to hide menu on WordPress admin
- Generate Advanced Custom Fields box in custom admin menu page
- How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?
- custom admin menu with custom filed
- Admin pages have no content
- difference between add_object_page and add_menu_page
- Theme editor menu item refuses to go away
- Remove menus and submenus
- Highlighting a Menu Item by Post Name
- How to remove the Plugins Editor from the admin menu
- Add Admin Menu Inside Construct or Init
- add logout button on admin side menu
- Master menu item for multiple plugins?
- Admin custom option screen not saved unless user manage_options capability
- WordPress admin menu formatting issue
- How to remove_menu_page added by a plugin that appears to have no referenceable slug
- Admin page menu keeps bugging out
- Admin Menu – Highlight top-level menu when on a sub-menu page (without showing sub-menu)
- How to prevent parent admin page from appearring as a child admin page
- Admin Menus – Name Menu different from first Submenu [duplicate]
- add_menu_page() with function inside a class [duplicate]
- Edit Page or Post from Top Admin Bar
- How to minimize WP dashboard menu programmatically?
- How to Add a Link to the Drop-Down User Menu in the Admin Bar?
- WordPress add_options_page() function not considering role
- How to determin which admin screen/sub screen I’m currently viewing
- Add post-new.php?post_cat=catslug to admin menu
- Link to Second Level Admin Page
- check current_theme_supports in admin_menu hook
- How do I insert the smaller variant of an image?
- Admin menu bar dropdown opens when I click on a form element (Chrome) [closed]
- Hide widgets/plugins from dashboard
- how can i add custom menu in admin panel?
- Admin page repeatable fields
- Hiding Admin Page While Keeping Menu Expanded
- Change URL of plugin admin menu
- menu_order not working with slugs that start with admin.php
- Associating custom submenu item with post type of top level menu item
- How to add_menu_page include a php file page from theme directory
- Wp menu add page link as custom empty link
- How do I demote a menu item in the admin menu?
- Removing posts and comments from WordPress
- Why use the Settings API over a new administration menu?
- Is it possible to pass variables from add_user_page?
- place a direct link to custom-stylesheet, under appearance menu in wp-admin
- Is there a limit to the number of items that can be added using the Appearance Menus Screen?
- Remove All in One Pack from the admin bar
- Insert & order custom post types in/as submenu
- Wrong current class on admin menu with add_submenu_page()
- How to access $menu variable in custom .PHP file that loads wp-load.php?
- Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?
- Manipulate javascript code from custom made admin page menu
- Add menu option to “New Post” menu in admin bar
- Role capability issue
- Adding a submenu to the Tools menu returns tools.php in a popup box
- Pagination in plugin’s backend
- WordPress admin menu formatting issue
- Dynamic admin submenu
- Add a page in admin without adding menu item
- Add_menu_page() error message -> “You do not have sufficient permissions to access this page”
- What action/filter/function determines “current” class in WP Admin Menu