function “add_submenu_page in wordpress connects to the home page instead of the submenu page
It may be because you are using the same name of the slug in the name of the callback function, try changing it. You can also do the following: You can even omit the callback function with an anonymous one. There is also no need to add a conditional to verify the capacity of manage_options, … Read more