How to hide plugin submenu title in drop down in admin panel in wordpress?

I have created a plugin that has some sub menus i.e add new list, besides that I also have pages to update the data, But I don't want to display these sub menus in dropdown. Here is my code.

add_submenu_page(
testimonial,
Manage Testimonial,
Manage Testimonial,
manage_options,
manage-testimonial,
manage_testimonial

);

add_submenu_page(
testimonial,
null,
null,
manage_options,
edit-testimonial,
edit_testimonial

);

If I use this it adds blank ul for these, How can I do this. This is the admin panel drop down.

Topic add-submenu-page plugin-development plugins Wordpress

Category Web


Renaming submenu "parent slug" option to null is the solution to this.

add_submenu_page(
null,
null,
null,
"manage_options",
"edit-testimonial",
"edit_testimonial"
);

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.