The main Settings page URL is wrong when my custom settings page is at the top

Support MB Settings Page The main Settings page URL is wrong when my custom settings page is at the top

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41783
    Alaan TVAlaan TV
    Participant

    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?

    #41791
    PeterPeter
    Moderator

    Hello,

    It looks like you are using a custom code to move the custom settings page to the top of the default submenus. If you use the WordPress function to register a submenu and move it to the top also, does the issue happen?
    https://developer.wordpress.org/reference/functions/add_submenu_page/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.