I have created a settings page and set its parent to options-general.php
to have it under the Settings menu, then moved its submenu to the top of the Settings menu so when I click on the Settings main menu it opens it because it's now the first child of the Settings menu.
The issue is with the URL of the Settings main menu, it's:
localhost/wp-admin/admin.php?page=settings_admins
, not:
localhost/wp-admin/options-general.php?page=settings_admins
.
Because of this, clicking the main menu will open my custom settings page, but will not highlight it as the current opened page, whereas clicking the submenu link does.
Is it something related to WordPress or your plugin?