how to avoid automatically creating submenu of a top level menu in wordpress
I have seen many tutorials over internet , but none of them was useful to me. I am creating a wordpress plugin where I created a top level menu (such as “name”) .Thats ok. But after creating submenu “under name” such as (“tuhin”,”tushar”) it displays submenus , but at first it shows top level menu name (“name”) as submenu.
My problem was here , the top level menu creates another submenu as name.
After searching a lot, I have find answer myself, the solution is:
remove_submenu_page( $menu_slug, $menu_slug ); The $menu_slug remains same as of function add_menu_page();