That’s not how you add submenus to the appearance menu, or how you create settings pages for themes.
Adding a submenu involves either add_submenu_page
which lets you add submenus to any menu item, or the helper function add_theme_page
which is for the appearance menu.
Here’s one of the examples from the official documentation:
function add_test_theme_page() {
add_theme_page( 'Theme Title Settings', 'Theme Menu Settings', 'edit_theme_options', 'test-theme-options', 'theme_option_page' );
}
add_action( 'admin_menu', 'add_test_theme_page' );
function theme_option_page() {
echo 'This is a test theme options page!';
}
Further reading: