how to avoid automatically creating submenu of a top level menu in wordpress

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.

Read More

My problem was here , the top level menu creates another submenu as name. enter image description here

Related posts

1 comment

  1. 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();

Comments are closed.