How to remove admin menu pages inserted by plugins?

Posted by Prem Tiwari | Updated on

You need to use the right hooks (which are not always the same as the URLs/slugs), and it doesn’t hurt to use a hook that runs later (e.g., admin_init):

You can use the following to debug:


This gives (for my setup) the following for the Contact Form 7 plugin menu page:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers