Remove a menu item created by a plugin
I’m trying to remove a menu item and tried several approaches, but have not had any luck. It was created from a FAQ plugin.
If I use this line:
remove_menu_page( 'edit.php?post_type=question' );
It will remove the main menu, however I only want to remove two sub-menu items contained inside that edit.php?post_type=question
URL address.
For the item I want to remove, the path in the URL bar gives me the following:edit-tags.php?taxonomy=faq-topic&post_type=question
andedit-tags.php?taxonomy=faq-tags&post_type=question
I have tried several solutions including remove_menu_page
and remove_submenu_page
to no avail.
What has failed so far:
remove_submenu_page( 'edit.php?post_type=question', 'edit-tags.php?taxonomy=faq-topic&post_type=question');
remove_menu_page( 'edit-tags.php?taxonomy=faq-tags') ;
remove_menu_page( 'edit-tags.php?taxonomy=faq-tags&post_type=question') ;
remove_submenu_page( 'edit.php?post_type=question', 'edit-tags.php?taxonomy=faq-topic&post_type=question');
remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=faq-topic&post_type=question');
remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=faq-topic');
remove_submenu_page( 'edit.php', 'edit-tags.php');
Leave an answer