Your code is correct but just you have called wrong capability in
add_submenu_page
.You just need to replace this
'manage_options'
instead of'manage-options'
. And please check it. It’s works.
Reference: https://developer.wordpress.org/reference/functions/add_submenu_page/
Related Posts:
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- Creating a WordPress admin page without a menu for a plugin
- Plugin development: how to create a form and get custom data?
- Master menu item for multiple plugins?
- wp_verify_nonce() why return false?
- Detecting when a custom taxonomy has been changed and display alert?
- Hide Theme options and Customize Admin menu
- White page on custom plugin option submit
- Suggestions on Approach to New Plugin I’m Stuck On
- creating a plug in that would tap into save/update action of posts [closed]
- Why WP_Screeen doesn’t show all options with admin_body_class
- How do I add an options page at the bottom of the list?
- How to remove a CPT Menu from the Root Admin only
- Admin menu hilighting wrong item for CPT
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- How can I pass value to function in add_menu_page?
- Submitting form to admin-post.php WordPress
- How to change a user’s password programatically
- Who are the most trusted plugin developers? [closed]
- Get plugin_dir_url() from one level deep within plugin
- How would you require and automatically download dependent plugins?
- How to delete custom taxonomy terms in plugin’s uninstall.php?
- Redirect to settings page after install
- What is the correct way for a theme to support plugin UIs?
- How does WordPress determine the primary plugin PHP file?
- translation does not work with text_domain
- Custom url structure for custom template
- flush_rewrite_rules() not working on plugin activation
- Determine plugin name from within plugin_action_links filter
- Plugin Functionality Only for Editor and Administrator
- Having separate plugins and themes folder for multi-site setup
- Many plugins making WordPress run slow by design?
- How do I turn a custom post type into a plugin?
- Add keywords meta to index.php page
- How to create ‘import dummy data’ option in custom wordpress plugin
- Object Oriented Plugin not working
- Does WP identify plugin by plugin name or plugin_basename?
- Modifying Author Link to add Author Meta in URL
- What are the specifics of WordPress development I need to know? [closed]
- Insert data from .sql file in wordpress plugin
- How can i get the post’s full html source by its ID?
- Force file download on plugin activation
- How to create a custom post type that contains another custom post type?
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Add action to fire when a published post is updated
- How to make multiple admin pages for one plugin?
- Create custom pages with a plugin
- Amazon.com intergration with WordPress?
- How can I add IP address to my post?
- Class or function wrapper for plugin code
- Show WordPress Plugin Menu(Admin) To Editor
- Licensing a Plugin [closed]
- Add a function call after content automatically?
- How to use add_action for multiple instances of the same class
- WordPress plugin with its own “site”/theme
- How can i listing current category and Featured Category post list?
- Ajax request sends url rather than data
- How to displaying Custom image, text and default image logo from Redux Framework option panel
- Security of a WordPress Plugin
- Grouping imported products and showing variations based on selected product
- save_post_product action not firing
- How to display the category name in the tab and post inside the tab in WordPress?
- How would I Redirect an existing WooCommerce customer to a specific url after Checkout
- Has blocks gutenberg block multiples registers type in my Plugin
- Ultimate Members Default Post Layout problem
- best way to upload a large file to wordpress using wp all import
- Why do actions with class and public method don’t fire __construct()
- How to define the slug for my custom plugin?
- Custom plugin settings page with tab. Error: “Sorry, you are not allowed to access this page.”
- Set “Open in New tab” as default option
- Generate and send ICS file through WordPress
- Field salespeople task management
- Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
- How to add a box note in wordpress plugin page ? top header side.
- Creating Admin Submenu Page via Class Method
- Widget outputs the value but doesn’t save anything inside the textarea
- Why some plugins are including wp-includes/plugin.php file?
- wp_schedule_event need to deactivate plugin changing recurrance
- A more elegant way to handle notices/warnings
- Redirect default login page to a custom page [duplicate]
- appointment plugin doesn’t display all appointments
- Display_rows() and column_cb() strange behaviour
- WordPress plugin options need to delete after deactivate & uninstall
- Doing action based on input from options menu
- Create New Admin Menu Section – Like how custom post type works, in a way
- Combining JS files to one script
- What are the downsides of using bootstrap in plugin development?
- How to generate a responsive output from plugin?
- The plugin generated xxx characters of unexpected output during activation
- How to hide a piece of code from a wordpress web page?
- How to dispaly post informations (such as titles) in an admin plugin menu page?
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Update Content for a Custom Block Toolbar Button
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Wrong block appender button showing
- Uncaught Error: Cannot use object of type stdClass while showing the list using WP_List_Table
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database