How to add a custom link on admin dashboard ?
-
Hi,
In WordPress admin dashboard, I’d like to add a custom elements linking to an external URLs.
I managed to add the red one using the code snippet below, but it outputs this url :
https://domain.com/wp-admin/admin.php?page=menu_slugI’d like the menu to point to a custom external URL
By default the menu is added as the last element, like the red one.
I’d like to know how to place the menu item in the upper nav bar (like the green one), or how to place it in a certain position like the yellow one.This is the code snippet I used :
add_action('admin_menu', 'custom_menu'); function custom_menu() { add_menu_page( 'Page Title', 'Custom Menu', 'edit_posts', 'menu_slug', 'page_callback_function', 'dashicons-media-spreadsheet' ); }
Thanks for your help
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to add a custom link on admin dashboard ?’ is closed to new replies.