对于菜单和子菜单,

function doctors_gallery(){
add_menu_page(
__( \'Doctors Gallery\', \'textdomain\' ),
\'Doctors Gallery\',
\'manage_options\', // The capability required for this menu to be displayed to the user.
\'DoctorsGallery\',
\'doc_gallery_view\'
);
add_submenu_page(
\'DoctorsGallery\',
__( \'Doctors Submenu Page\', \'textdomain\' ),
__( \'Doctors Submenu\', \'textdomain\' ),
\'manage_options\',
\'DoctorsSubGallery\',
\'doctor_submenu_callback\'
);
}
add_action( \'admin_menu\',\'doctors_gallery\' );
function doc_gallery_view(){
echo "ghfhgfgh";
}
function doctor_submenu_callback(){
echo "Sub Menu section";
}