Set the parent_slug property to null, example;
add_submenu_page(
null // -> Set to null - will hide menu link
, 'Page Title' // -> Page Title
, 'Menu Title' // -> Title that would otherwise appear in the menu
, 'administrator' // -> Capability level
, 'menu_handle' // -> Still accessible via admin.php?page=menu_handle
, 'page_callback' // -> To render the page
);
This will hide the sub menu page from your parent (top level) menu link.
It does not state this in the Codex entry for add_submenu_page though.
It now states this in the Codex entry for add_submenu_page (thanks goto Ian Dunn).
Related Posts:
- add_menu_page() with different name for first submenu item
- How to add more than 1 user role to sub-menu pages
- Odd behaviour with submenu link creation
- How to avoid creating first submenu page that is same as menu page?
- Sub Menu content is being duplicated
- Is there documentation reference for forms in menu and setting pages?
- Why won’t this submenu page show? – My First WordPress Plugin
- How to create a custom post-new.php page for plugin , no wp menu
- Add a custom submenu under submenu in a Custom WordPress Plugin
- Add Admin menus or submenus depending on conditions
- edit-tags.php in plugin admin menu hides when is the active page
- Adding querystring variable breaks admin URLs
- Custom database table entry edit page
- Admin adding submenu that has the same destination as the parent menu
- PHP error with shortcode handler from a class
- Passing arguments to a admin menu page callback?
- How do I log plugin (cron) actions?
- How can I run AJAX on a button click event?
- Adding pre-publish checks with Gutenberg
- Error getting correct blog_id on MU from functions.php
- How Do I Make WordPress Run an Event Every Day?
- How can I change the frequency of a scheduled event?
- How to filter $post->post_content prior to save
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to check if certain plugin exists and in expected version
- How to add SQL file with PHP to WordPress database [closed]
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- array_map() for sanitizing $_POST
- Is there a faster way than wp_insert_post to add content to a blog
- How to include external library in wordpress plugin
- Delete a specific item menu when I deactivate my plugin
- Ajax in WordPress – path issue
- Platform/Website that Supports Crowd-Funded WordPress Projects? [closed]
- Get user id for delete and update selected user
- How can I call template partials inside my custom plugin
- Decrease RSS cache time in plugin?
- Add version query tag to all images
- Creating table with plugin is not working
- How to delete an user including data from custom database tables
- Add custom element ID depending where the widget place is, sidebar or footer
- My plugin class doesn’t work! [closed]
- Beginner advice
- Call PHP file within a plugin to activate function
- add_action not calling back to function
- Example Dashboard Widget, Cancel not working
- Woocommerce checkout update totals with datepicker
- Multiple options pages validation for a plugin
- How to get plugin activate URL to use URL vars?
- rewrite URL based on selected taxonomy for post page
- Woocommerce – Convert Delivery method into a custom field
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- get_option() not returning expected value from plugin
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Testing Rewrite Rules with PHPUnit
- Add a page in admin without adding menu item
- custom permalink’s rewrite rule for page id
- how to get context information inside my funcion
- Is disabling test_form in wp_handle_upload a security concern?
- How can I identify it as admin page or not?
- AJAX form post returns 0
- Adding admin menus to wordpress
- Update custom plugin with WP-CLI
- Delete data from database using row action
- Autogenerate a Table of Contents
- Update wordpress Core Remotely
- Proper way to use useSelect
- How to create templates for a custom module to show on the front end within my theme?
- Access to apache logs from plugin
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- Translating plugin settings page – dropdown list
- Hide one specific woocoomerce product
- settings api – add_settings_section not working
- How to overwrite iris color pallates from theme to plugin
- Remove Meta-boxes (Yoast SEO plugin) [duplicate]
- Can I use a custom post type as a custom taxonomy for a different custom post type?
- WooCommerce currency converter support [closed]
- Woocommerce – looping product images
- wp_schedule_single_event is set correctly but sometimes not fired
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- Attaching Image-file to userId
- wp.media gallery collection sometimes undefined
- Pass Values in URL on WooCommerce Product Page
- Can’t load a script in my plugin page
- Plugin Install Issue “-1” Appended to end of plugin name
- ajax call return 406 not acceptable for non logged users only
- $ is not defined [duplicate]
- Can’t upload image via submitting custom post from frontend
- Custom Plugin activation error in Multisite
- Redirect theme directory to plugin theme directory
- replacing jquery google cdn with a new version dynamically
- Dynamically getting tags in post edit screen
- How do WordPress plugins work with oAuth2 APIs?
- Translation not working for Constant strings in Plugin
- How to force download a plugin generated file?
- WordPress mails being sent from @locahost and being rejected
- How to implement pagination into a wpdb->result query?
- Slug is not shown for my custom post type
- wp_register_sidebar_widget in loop within a plugin?
- Adding parent custom post type menu option
- How to plugin function code move to theme function.php ? I’ve tried below code but not working [closed]