You’re very close.
When you add your first submenu page you want to duplicate your initial menu page. In your second add_submenu_page you are missing the function callback for that page. Technically this parameter is optional, but it changes your url from /wp-admin/sub-menu-page to /wp-admin/admin.php?page=sub-menu-page.
Give this a shot:
add_action( 'admin_menu', 'my_menu_pages' );
function my_menu_pages() {
add_menu_page( 'WISE Admin', 'WISE Admin', 'manage_options', 'wise-menu', 'my_menu_output', 'dashicons-tickets', 2 );
add_submenu_page( 'wise-menu', 'General Settings', 'General', 'manage_options', 'wise-menu', 'my_menu_output' );
add_submenu_page( 'wise-menu', 'Submenu Page', 'Submenu Page', 'manage_options', 'sub-menu-page', 'submenu_settings' );
}
Related Posts:
- Passing arguments to a admin menu page callback?
- Admin settings update updating every time home page is hit?
- What’s the best method for emptying an option created with the Settings API?
- What is the recommended way to create plugin administration forms?
- How to add a new plugin page under desired Options page?
- Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?
- Overwriting Core WordPress Functions with Plugins
- Naming Admin Menus and Submenus
- Current class on admin menu using add_submenu_page()
- Add Admin Menu Inside Construct or Init
- Hook event for upload image in the menu
- Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page
- add_menu_page() with function inside a class [duplicate]
- How to add Font Awesome 5 icons in WP Admin dashboard menu?
- How to put placeholder text in the main post input area?
- Unified Approach for Placing Option Pages
- Plugin with specific admin menu icon
- OOP Plugin and Menu – Call to undefined function register_setting()
- Global State During an Admin Post
- Howto: Use Custom Post Types as Submenu Items in Admin
- Sub Menu content is being duplicated
- Set different custom menu items for different user roles
- Show/Hide ‘add new user’ custom fields in wordpress admin panel by click another field
- Bootstrap doesn’t work on admin menu page-How to override wp-admin style?
- is it recommended to use WP_List_Table?
- Creating Admin Plugin – Content of a page is displayed at global scope as well
- Add a page in admin without adding menu item
- Silently register plugin pages
- WordPress theme options Menu
- Print Dashboard submenu name and filename
- I am trying to make a page in the admin section similar to the appearance of the Profile page for users
- Unable to get a simple plugin admin page to work
- Disable Auto-Expanding Menu in WordPress Admin Menus
- in_array function Problem
- Use options to control jQuery plugin
- Restrict certain actions to plugin-specific admin menu pages only
- Proper way to create an administration page without adding it to the menu
- Pause plugin option page until all data manipulation is complete
- How to add text editor in plugin menu?
- How to make an admin plugin menu page go full screen?
- How to add admin.php to WP Admin Menu Link
- Convert each new line in the textfield as a new value in an array
- How put the correct URL to sub-menu plugin?
- Developing a plugin where users can edit entries saved in database
- Add a description/hint field in the admin page of a plugin
- Forcing ALL plugin Admin menus into a separate menu
- Link to a admin submenu item using a custom link
- Plugin admin list pages as submenu
- Change Admin menu placement using hooks
- Menu_slug used for creating options page
- How to design WooCommerce-like admin tabs for plugin settings page?
- Show Admin Menu
- adding an options menu that allows saving multiple sets of said options
- Get a path to a different plugin
- How to check uniqueness of plugin prefix?
- Plugin API for easy admin list table generation, handling & exporting of MySQL tables?
- Change default admin page for specific role(s)
- Check for dependent plugin and if false dont activate plugin
- How to check username/password without signing in the user
- Log in from one wordpress website to another wordpress website
- What’s the earliest point I can get the queried object ID?
- Is it save to require plugin.php early to be able to use get_plugin_data() earlier?
- Unit Testing a Plugin functionality with cron
- Best way for plugin to accept POSTs?
- Error “Call to a member function switch_to_locale() on null” during insert_with_markers
- multiple functions with same filter
- Calling plugins API within a theme
- How do you output enqueued scripts to an admin page?
- Does WordPress’s HTTP API use any caching?
- query users by role
- call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members
- How to Create Custom HTML Tag on Editor in `Text(HTML)` mode
- null callback in add_settings_section
- Is there a Filter that I can use to filter the tags before they are inserted in to the database?
- How long should it take for a plugin to fully load into the WordPress.org plugin repository?
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- get post attachment using ajax
- Including comments meta box on a plugin page
- How to exit a plugin’s execution mid-stream?
- Issue with contextual help overwriting existing content
- Redeclaring a plugin function within a class
- enqueue script/style plungin development
- How to Add a Custom Size for Thumbnails for WP – Gallery
- Will I get an error if I try unscheduling a WP Cron scheduled task that wasn’t scheduled?
- Conditional Generation of Image Sizes using add_image_size
- Plugins and caching
- Display time difference (6 hours ago) in a Soliloquy caption
- Empty Array is Giving Warning for array_merge()
- Translations only load from `wp-content/languages/plugins` but not from the plugin’s languages folder
- GET request return value as error instead of success
- How to update global variables in plugin activation callback?
- How to include a page template and template part into my plugin
- Multiple instances of $opt_name in redux framework
- The Events Calendar featured image as body background?
- problem with blank page
- Cannot echo a JS variable to a jQuery plugin coming from wp_localize_script
- first_name property missing inside register_user action hook
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- Call API on post save/update and show the result in admin area
- WordPress integration with GitHub without cmd line access nor local development?