This is an old post but can’t you just use wordpress $menu and/or $submenu globals like Oleg suggested in number 2.
When in doubt copy WordPress:
For example to add link this seems like it would work:
function add_external_link_admin_submenu() {
global $submenu;
$permalink = admin_url( 'edit-tags.php' ).'?taxonomy=category';
$submenu['options-general.php'][] = array( 'Manage', 'manage_options', $permalink );
}
add_action('admin_menu', 'add_external_link_admin_submenu');
You can replace the $permalink = ... with anything
So this should also work :
$permalink = 'http://www.example.com';
Also, it’s suggested not to use ‘administrator’ (even though I use it as well. Anyway, read this ticket for alternative solutions.
Related Posts:
- How does WordPress generate URL slugs?
- Get taxonomy slug from url
- Best way of removing emoji support from url / slug only
- Allow UTF-8 characters in the user slug part of URL
- Why ids in urls don’t work but slugs do?
- Easiest way to simulate WordPress’s URL resolution to retrieve post ID, etc?
- pass user id in slug and get user information
- wp_insert_post – How do I prevent incremental numbers on child pages?
- How do I link to a blog not set as the homepage?
- Allow Chinese character on post URL slug
- Problem with change url for all subpages (.htaccess)
- How to edit URL Slug?
- How can I change a media attachment URL/slug, so that I can use that slug for a page?
- Can anybody provide me with a function to generate slugs?
- Site transferred to new server produces 404s
- Thousands of unwanted URLs/pages with “0” in slug created
- Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page
- How to remove % character from url
- Can non-latin characters appear in slugs?
- Allow duplicate slugs for pages and posts
- Avoiding the -2 in slugs
- mysterious issue with stop words in urls not working – how can I restore multiple url access?
- How to create URL for Pages/Posts
- Modify WordPress to not replace + (plus) characters from URLs?
- How do you retrieve a post by slug name through REST API?
- How does routing on wordpress work?
- Redirecting to old domain after migration
- Unwanted media library URLs in posts?
- How to remove file versions from the file source links in wp_head?
- How to prevent apostrophes and quotes from appearing in permalinks?
- How to create non-unique sub-category slugs?
- Limiting the number of words or characters in the slug/permalink
- Dynamic URL generates dynamic content
- Pages redirected to attachment post
- Get url from file uploaded in Media Library
- Password protected page Hash url
- Which of WordPress’s .php files need to be directly accessible via HTTP?
- How do I override the emoji url?
- Site broken after using URL Change in Admin
- Custom Post type permalink structure with custom_post_id
- Setting a url for a page
- Is it necessary to check for `content-type` in headers?
- Adding special characters to slug?
- What is the correct way to convert the absolute path of the executing script to a URL, in WordPress?
- The requested URL was not found only on localhost
- 404 error when passing “cat” parameter to URL
- Is it possible to configure WordPress’s Core Files to accept duplicate Child Categories?
- Problem with utf8 link
- how to trace a file by the route url
- Is get_permalink also the canonical URL?
- Remove trailing slash from previous_posts_link()
- Moved WP into new folder. How to fix image links in posts?
- Using esc_url_raw with protocols properly
- How to parse a custom url (within WP site) and obtain params passed to that URL
- Change URLs depending on alias
- wordpress copyright dynamic
- Multiple duplicate URL’s
- Dynamic URL and pass the data to an iframe
- DNS – Change WordPress Site Name?
- Unnecessary url
- How to close tab automatically if URL has specific word? [closed]
- Replace category name with article id in wordpress urls
- Finding URI in Child Theme
- Make custom system url
- Sanitizing URL in a WordPress plugin
- How to display translated content with custom slug?
- How do I structure my permalinks in WordPress?
- How to get a page url segment on wordpress?
- How to set wordpress url on local host to access it via VPN
- How to create a user ability to save pages with full url?
- Add more than one query parameter onto wordpress url
- WordPress Website change directory
- How to create a standard WP Page that has the same url as an archive
- Change dynamically URL to SEO friendly via .htaccess?
- Get userdata from url
- How to make url variable?
- WordPress dynamic subpage for ACF
- From whence %E2%80%8E at the end of post link
- WordPress Address (URL) Reverts back
- wp-login.php ampersand in url results in 404
- How to pass REQUEST_URI to function
- Change path/url of admin-bar.min.css
- wordpress url with format .com/category/sub-category
- Typing local WordPress URL works, but clicking the same link does not
- URL Forwarding – wordpress links reverting back
- Get gallery url (Nextgen) [closed]
- How to use query string in URL to display content on the wordpress page
- Function to get custom post image URL
- How to echo a dynamic url
- Block a specific url request
- WordPress rewrites my link with custom URL scheme to http(s)
- Show page name after home url
- Display custom data based on URL slug
- how to add param string after website url in wordpress?
- Are the wp entries in these URL’s legitimate?
- url ends in “/embed”
- What is the correct url to request the 404 page?
- Get Page URl when changing slug and permalink
- Switch WordPress to non-absolute links? [closed]
- How to hide ids from URL [closed]