How to remove empty menu space when creating admin page without menu title using add_submenu_page

Question

I have added few pages to handle edit, view page that is should not be accessed from wp-admin navigation menu and its a success. But now on my menu, I have empty space as sub-menu.

enter image description here

Below are my codes to add pages.

add_submenu_page('iuser_dashboard_page', 'Edit iUser', null, 'manage_options', 'i_edit_user', 'IEdit_User');
add_submenu_page('iuser_dashboard_page', 'User membership detail', '', 'manage_options', 'view_user_membership_detail', 'view_user_membership_detail');
add_submenu_page('iuser_dashboard_page', 'User enrollment', '', 'manage_options', 'view_user_enrollment', 'view_user_enrollment');

But how to remove the empty submenu from the navigation menu?

Thank you in advanced.

0
Murniyanti Malik 1 month 2021-05-10T01:33:14-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse