Skip to content

Instantly share code, notes, and snippets.

@bobbydank
Created January 11, 2023 20:33
Show Gist options
  • Save bobbydank/f4b4e73010a78d5a8efbb18e69565bcf to your computer and use it in GitHub Desktop.
Save bobbydank/f4b4e73010a78d5a8efbb18e69565bcf to your computer and use it in GitHub Desktop.
function custom_submenu_page() {
add_submenu_page(
'options-general.php', // Parent menu slug
'Custom Submenu Page', // Page title
'Custom Submenu', // Menu title
'manage_options', // Capability
'custom-submenu-page', // Menu slug
'custom_submenu_page_callback' // Callback function
);
}
add_action( 'admin_menu', 'custom_submenu_page' );
function custom_submenu_page_callback() {
// The HTML content and logic of your submenu page goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment