This has to be solved:
- with an unconventional submenu manipulation, provided by @t31os in this Answer
- and some jQuery
add_action( 'admin_menu', 'wpse_66020_admin_menu_new_item' );
add_action( 'admin_head', 'wpse_66020_add_jquery' );
function wpse_66020_admin_menu_new_item()
{
global $submenu;
$submenu['index.php'][500] = array(
'<div id="wpse-66020">Go to WPSE</div>'
, 'manage_options'
, 'https://wordpress.stackexchange.com/'
);
}
function wpse_66020_add_jquery()
{
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('#wpse-66020').parent().attr('target','_blank');
});
</script>
<?php
}
Resulting in this:
Related Posts:
- add_menu_page() with different name for first submenu item
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- Change the_title() of a page dynamically
- How do I programatically insert a new menu item?
- Add Dividers or Separators Between Nav Menu Items
- Nav Menu meta failing to import
- Overwriting Core WordPress Functions with Plugins
- Some nav-menu filters do nothing
- Determine which theme location a wp_get_nav_menu_items is for
- Can I add pages to my custom menu via script?
- Replacing WordPress menu functionality with a plugin
- Hook event for upload image in the menu
- Why isn’t the Settings API designed to work for plugins using custom admin menus? [duplicate]
- How do I approach removing menu items on the fly based on settings in my plugin?
- What is the difference between current_page_parent and current_page_ancestor?
- Delete a specific item menu when I deactivate my plugin
- Create a Page via plugin
- How to assign a WP 3.0 custom nav menu to a theme’s navigation menu location via script?
- Header Button Chance Polylang Elementor
- PHP 7 – Class Method Compatibility Issue
- How to add pages to custom menus on the fly [duplicate]
- How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?
- Add notification bubble notice in navigation using transients
- Get Current Menu Location inside Nav_Walker
- Adding custom fields to WordPress nav menus
- Sub Menu content is being duplicated
- Plugin menu addition in multisite
- Remove unwanted elements for a wp_nav_menu
- Is this best practice for Dynamically adding items to WordPress menus?
- How to remove or add submenu item on plugin activate or deactive
- Custom code for WordPress dynamic menu
- How do I access the menus produced by Dashboard > Appearance > Menus
- wordpress add_submenu_page adds broken link
- WP Enqueue style on all plug-in pages
- Add child pages to submenu automatically
- Customize existing menu item
- Menu page with minimum capability as ‘Subscriber’ doesn’t allow ‘Admin’ to access it?
- Issue with plugin sub menu and pages
- How to add Plugin functionality in WordPress Frontend Menus
- How to hide page links from theme menu
- WP_NAV_MENU filter targets all menus
- How do I add a menu item to a Pods admin menu?
- Add user managable titles to custom menus?
- How to create archive page to add in menu
- How to show only the last two categories in a menu?
- Always hide a page from the menu
- remove different admin menu for specific users
- How to get an array out of a nav menu if it’s a plugin?
- What happens when you create/edit a menu
- Plugin admin list pages as submenu
- Adding parent custom post type menu option
- Create and style menu
- Change the class of wordpress menu
- Invalid Menu Items
- Declaration of mandoe_menu_walker::start_el(&$output, $item, $depth, $args) must be compatible with Walker::start_el(…)
- Custom Nav Walker $item->url producing malformed hyperlinks
- Displaying an Uploaded Image as a Custom Avatar in WordPress
- Adding a navigation with wp_nav_menu() to a custom block in the site editor
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- How to output message during plugin activation
- On the WordPress Admin section how do I link to submenu pages created for a plugin?
- How to provide translations for a WordPress TinyMCE plugin?
- Where do I start from
- Where is it better to start learning how to develop for WordPress?
- Is there any way to test if a function running only on plugin update is successfully running?
- Change of query var in pre_get_posts not maintained
- Hook for post permalink update
- Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page
- Load page template with custom content using a plugin
- Will changing the ‘Plugin Name’ header in the next update of a plugin break anything?
- Performance of several get_option() calls
- Add tab to profile.php wordpress plugin development
- Sharing a common set of image files for media library, across all sites within multisite
- Plugin update not reflected in WordPress plugin page
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- How to create database table, add data, update and delete using wpdb via plugins?
- Extending theme PHP class in plugin
- Any ideas to trigger some code after plugin update?
- How to test plugin update through WordPress plugin updater without tagging new release in the repo
- WP and object persistence (or lack thereof)
- Bad Request in AJAX
- Remove sidebar on single page using plugin API
- When does save_post hook fire on post save/update
- Enqueuing scripts and styles in custom plugins
- Adding custom stylesheet into header.php using a plugin
- How to remove/replace current page template?
- Using password protection to load different page elements?
- .htaccess with WordPress – create my own pretty url with parameters (above WordPress settings)
- Generating a password-protected front-end page via a plugin
- wp_remote_post not working with admin-post.php
- How can we stop showing short code in create or edit post section
- Default media uploader is not showing in wordpress website
- Load custom translation in custom plugin fails
- Uncaught ReferenceError: kpoejy is not defined
- Is there better way to do this without duplicating queries?
- How to create a simple plugin which show/hide an html code in wordpress?
- Translation of plugin Upload button
- Create wordpress dashboard metabox which spans all columns
- add_filter adds output in the head
- How can i add insertion point between inner blocks in my custom block like core blocks