I’m trying to save my client a few clicks. I’ve created a custom role of “Customer” and I’d like to get them to that screen, without having to have them click “Users” and then select the “Customer” role.
So, I have a custom menu called “Orders”. I’d like to add a submenu called “Customers” and “load” this page:
users.php?role=custom
I’m guessing I have to use the callback function on add_submenu_page and then load that template? What’s the right way to go about this?
You can add an interal link quite easily, it’s the same approach you use for adding custom items, you simply exclude a callback function and set the menu slug to the applicable URL, here’s an example.
Adjust the code as appropriate(required cap, naming, etc..).