The $location parameter was incorrect. Try this:
function redirect_to_local_110(){
wp_redirect( home_url() );
exit;
}
function add_home_link() {
add_menu_page( 'Course', 'Course', 'read', 'home', 'redirect_to_local_110', 'dashicons-welcome-learn-more');
}
add_action( 'admin_menu', 'add_home_link', 1001 );
Or you could use this:
function redirect_to_local_110(){
wp_redirect( 'http://www.example.com', 301 );
exit;
}
function add_home_link() {
add_menu_page( 'Course', 'Course', 'read', 'home', 'redirect_to_local_110', 'dashicons-welcome-learn-more');
}
add_action( 'admin_menu', 'add_home_link', 1001 );
Related Posts:
- Add separator to admin submenu
- How do I fix this error: Warning: invalid argument supplied for foreach()?
- How can I get an array/list of all current WordPress Admin Menu items?
- how to only add a top-level admin menu without it creating a sub-level-menu
- Hiding Admin Page While Keeping Menu Expanded
- wp_is_mobile() inside js
- Appearance > Menus
- Changing the Order of Admin Menu Sections?
- Adding an Arbitrary Link to the Admin Menu?
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Renaming a WordPress Admin Menu
- Remove Pagination in Appearance -> Menus -> Categories
- renaming an admin menu item with decimal array index number
- How to add menu to Dashboard that can be viewed by all users
- Add column to pages table
- Make Theme automatically choose default nav menu
- Is it possible to add a filter for the output of nav-menu items in admin?
- How to make pages metabox display all hierarchy in menu admin?
- Disguise Multi-Page site as Single Page
- How to display custom post meta in the appearance->menus page
- Remove Metabox from Menus screen
- WP Nav menu append to url
- Sort wp_nav_menu() by menu order
- Theme menu in Admin Panel
- How to show Home Page link in WordPress Menu and how to add an icon to this?
- Disabling ‘posts’ in Appearance > Menus
- Wp menu add page link as custom empty link
- Get admin menu link
- wp_nav_menu including Skype URL
- Pass GET params to URL from a main menu item
- Missing Menus Structure
- Hook for number of items in Appearance > Menus > CustomPostType > View All [duplicate]
- Link to Homepage in Menu
- Filter for Admin Nav Menus Drop Down
- SlideDeck 2, make back-end visible for admins only
- Limit the menu child levels under “admin > appearance > menus”
- Add column to pages table
- WordPress menu not loading in the admin side appearence-> menu tab
- Programmatically add existing pages and subpages to Appearance Menu
- WordPress Plugin menu position overwrite other item
- Ad custom admin page like WordPress customizer [closed]
- Admin menu structure
- How to override the theme home page?
- Appearance Menus Screen – menu item drop down menu not functioning
- Adding an admin menu page showing the link twice – how to solve this?
- Change the menu home link to something else
- Why am I timing out when using the Menu Editor?
- Admin-ajax.php 500 error when Add to menu is clicked in admin
- Can I have custom post types in “Add menu items” on in the Admin > Appearance > Menu
- Add Labels to Admin Menu ( How To )
- How can I add a menu item to the admin area?
- Admin top level menu, pointing to an external url
- How to making dynamic URLs for menus in WordPress?
- sub menu link is not working
- Limit wp_nav_menu_objects() only to first-level menu items
- Adding top level items in the admin menu that link to a post
- Strange menu behaviour wordpress admin [duplicate]
- Adding CSS-class to WordPress Menu in backend
- Menu deletes all items and position – wordpress bug?
- Plugins & Setting Menu Items Removed From Admin Panel
- Add # to submenu URLs automatically
- add_menu_page does not render the expected result
- Admin Menu Hack (Left side in Dashboard)
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- How to get or know the slug of home.php
- How to create menu spread over four lines including images
- When I click a custom menu link, how do I make it update the URL in the browser to the external link?
- sub.menu’s not working
- Using menus to link to sections on the home page
- Keep source page URL parameters on custom link menu item
- How to link current logged-in user to their author page via URL (Beginner)
- WordPress menu items automatically becoming empty custom links
- Why is my navigation in my onepage not working?
- Admin menu in different languages
- Add prefix to url, but products not showing in page SHOP
- Need to remove the admin menu item from a be theme in wordpress
- Swap out a page that is a parent to a many many pages
- Removing wp admin menu item on top bar of admin backend
- Menu links URL with PHP GET method
- Only the index.php/homepage open while other pages are not opening
- Restrict user to edit only edit a certain menu
- Homepage is not loading
- Need Help Regarding Menu Magement in admin
- Roles see different top menu (nav menu)
- Why does WordPress convert absolute URLs to relative URLs for menu items?
- how to create pages and link them to a menu
- How to create menu in Word Press 4.2.2?
- Removing menu item doesn’t get removed on edit post
- Query for menus in backend (BE)
- List of WordPress menu item indices?
- How to change page location in WordPress
- How do I fix the URL used in the WordPress admin menu for customize.php
- How to change the default url for ‘Posts’ link?
- Add item ONLY to the primairy navigation
- Navigational error
- How can I disable sorting/dragging of a menu item in the custom menu admin?
- How to let the role “editor” to control the menu?
- Why plugin’s icon for the menu not found?
- How to change the markup created by menu item only on chosen items?
- How to change WP menu item type?