WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I follow instruction on this page to remove some admin menus.


But is seems it only works on default wp admin menus. Admin menu added by plugins is not getting removed.

For example, I tried removing admin menu of wordpress seo by yoast using

remove_menu_page( 'admin.php?page=wpseo_dashboard' );

But the menu remains there. All other standard wp admin menus were removed except wp seo by yoast.

Any idea how can I also remove admin menu of plugins?

I saw some similar questions but the recommended codes doesn't seem to be 3.8.1 compatible so I added this question to start a new fresh question specific to 3.8.1


share|improve this question
You must ensure to call remove_menu_page after the page is added. Do you know which hook WP Seo by Yoast is using to add the menu page? When you find it, use same hook with a lower priority. – gmazzap Feb 2 '14 at 23:16
How will I know the hook? – Charles Wayne Feb 3 '14 at 8:50
Search the source code... – gmazzap Feb 3 '14 at 9:00
up vote 0 down vote accepted
add_action('admin_menu', 'remove_wpseo_admin_menu_links');

function remove_wpseo_admin_menu_links(){

remove_action( 'admin_bar_menu', 'wpseo_admin_bar_menu', 95 );

remove_menu_page( 'wpseo_dashboard' );

share|improve this answer
Thanks. That did it. So, for me to get rid of several plugin admin menu, I have to look for their hook and use remove action? What if I have five admin menu to remove, I have to search for all of their hooks? Is there no way to ad action that will eliminate it regardless. Or perhaps a reverse way, to force WP admin to show only specified admin menu ad disregard anything not specified on the function. This is one down anyway. Thanks for the answer edit sorry i do not have enough rep yet to vote up. – Charles Wayne Feb 3 '14 at 9:59
Depends. Which menu links specifically? – Brad Dalton Feb 3 '14 at 11:04
Thanks.. Perhaps I will just contact the author since the plugins are premium ones. – Charles Wayne Feb 3 '14 at 13:37
is there no way to call the function that remove the links after all pages has been called? making sure that it will be included when remove function is called? – Charles Wayne Feb 9 '14 at 9:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.