Add Top-Level Menu that opens URL

I’ve experimented with various solutions or workarounds proposed elsewhere on this site – for instance here: Adding an Arbitrary Link to the Admin Menu? and this one here: http://www.techedg.com/2014/09/06/5575/a-simple-way-to-add-an-external-link-to-the-wordpress-admin-menu/

All of the solutions that I tested that worked included that behavior of adding an unwanted blank admin page. I’m not sure that there is not some solution buried somewhere – or some trick you can use to close the page after it’s been opened! – but the indication is that WP does not want you to do what you want to do.

I think the cleanest solution you can try is to add a link directly to a submenu. You’ll find some indications on the pages I linked above.

You might also consider simply adding the link – or the re-direct – via the blank page: So, in other words, cooperate with WordPress load the page, and work it from there: Add a link to the author page that also appears there, initiate some other process, point to the user-profile page, or incorporate other functions for editing the user’s profile information.

To answer your minor question, to make the link available to all users, use ‘read’ instead of ‘manage_options’ as the third, capabilities variable under the add_menu_page() array.

Leave a Comment