Assume I have the following code

add_menu_page('My Title', 'My Title', 'publish_posts', 'my-slug', function () {
    require_once ('path/to/render/page.php');

This code will add a menu item to the side bar of the admin section, and if you click on that new menu item, and inspect the URL,


Everything is great so far.

Now my question: Is it possible to change the default URL above to something maybe like this?


Or this?


Or even this?


Basically, I do NOT want the query variables to be displayed as shown in the default setup. In other words, can I change the permalinks for the back-end?

Thank you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.