I’m trying to add custom menu item to the Dashboard menu, which will contain only link, not the whole page with the content.
For example: if I go to Posts and click on one of the posts titles to edit it – I’m redirected to the url something like: mydomain/wp-admin/post.php?post=58&action=edit.
I want to create Dashboard menu link that goes directly to that edit page.
I’ve tried to use add_menu_page but this function adds a new page with the content to the dashboard menu, while all I need is to add dashboard menu item with the URL link (mydomain/wp-admin/post.php?post=58&action=edit) to go directly to edit a post.
Yes, for this you will need to use global $menu or $submenu variable and use it on admin_menu hook –