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?
- Difference between esc_url() and esc_url_raw()
- Remove All Query Arg
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- How to set global variable in functions.php
- Can’t login after my site was moved to a new server
- Adding a hook to ‘parse_request’ so that siteurl/pagename/xyz ignores “xyz”
- How to have numeric URLs in Posts and Pages
- Weird: /?name in URL leads to blog
- Generate one time URL
- In Settings>>General I am missing some fields
- Is dynamic URL possible in WordPress
- Adding target and _blank as it’s value to the allowedtags
- Make attachment pages require a base url
- How to create a custom page base on URL for WordPress?
- How to make menu items active based on hash
- taxonomy/category term in URL slug irrelevant for post?
- URL parsing – what is it?
- Components used in Themes and Plugins: How to get file URL?
- Site URL always in front of other URLs
- Custom page slug without creating a WP page
- Moving a test WP site to live
- Non latin post slug truncate
- Displaying Post with Custom URL with RewriteRule or add_rewrite_rule
- How to get URL for the first page of post archive
- Newline URL entity when using esc_url()
- How to handle this URL Structure. Keep getting “page not found”
- Custom url in wordpress
- How to auto gen. custom post type values in other custom post type in url?
- WordPress get parameter ‘unapproved’ and ‘moderation-hash’
- URL issue after migrating to dev site
- Misentered the site address url. How to recover? [closed]
- How to call for bloginfo inside function in functions.php?
- Moving a WordPress site – Installation issue
- What is the best way to figure out which template file that a “pretty permalink” is using?
- How do I add a tag slug to a category URL to filter posts?
- Can’t change the wordpress site url
- Wrapping add_query_arg with esc_url not working
- Relative URLs within site
- Using WordPress for a site’s static marketing pages and blog at different URLs
- What is the best way to revert to www version of domain name?
- Need to check if user is on a particular page
- How to set path to the image instead of alt in media.php?
- Go back to my home page
- Changed domain name and all the 301 redirects work except the ones for the thumbnail image which return 403 Forbidden error
- Changing url of author page
- How to get previous and Next Post Url in the_post_navigation
- A different permalink structure for different categories
- Encode URL for WhatsApp “click to chat” without loosing accented characters
- append currency to URL
- Create 600 links to separate files on google drive
- Locked myself out of WordPress because I changed my URL and computer shut down
- Cant access my wordpress.org locally
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- I changed the URL [closed]
- WP site homepage displays url link at beginning of each featured post
- how to set url in admin option page
- Unable to login after changing WordPress site url
- Why is my WordPress URL shortened
- What does this structure of the URL mean? http://www.example.com/?i=0
- Post as frontpage – avoid duplicate content
- International characters in slugs to redirect to
- How to create a dedicated folder for specific role via registration
- How to get the correct URL on my wordpress site?
- WordPress custom form post to different page
- How to redirect WP post with a specific word in the URL
- Display Plugin information on specific url
- Making a site URL
- Avoid too long words in a post title, post content or comment but only if its not a url
- Change URL to filter posts
- How to remove slug from url (custom post type)
- Enabling canonical links to force search engines to go to site.com rather than site.net [closed]
- Why my wordpress site URL does not begin with my domain?
- I changed my url and cant access my site, Help?
- Accidentally changed the url
- Replace media external links with local links
- WordPress rewrites my link with custom URL scheme to http(s)