Move plugin-settings to ‘Settings’-menu in the admin


I hate it, when plugins add their own settings like this:
WordPress admin 1

It’s cluttered and annoying. Can I somehow move them in under ‘Settings’:

WordPress admin 2

I imagined something like, checking if there is a plugin by the given name; and if there is, then remove it from the admin bar, like this (however, this doesn’t work):

function custom_menu_page_removing() {
    // Neither of these two work (the first is the 
    // link, the second is the slug
    remove_menu_page( 'admin.php?page=themepacific_jp_gallery' );
    remove_menu_page( 'tiled-gallery-carousel-without-jetpack' );
add_action( 'admin_menu', 'custom_menu_page_removing' );

I then imagined adding a link to generel settings like this:

function example_admin_menu() {
    global $submenu;
    $url = home_url() . '/wp-admin/admin.php?page=wpseo_dashboard';
    $submenu['options-general.php'][] = array('Yoast', 'manage_options', $url);
add_action('admin_menu', 'example_admin_menu');

But my two problems are these:

  • I can’t find the correct remove_menu_page( 'URL' ); to remove either Yoast or TP Tiled Gallery. How do I do that?
  • If I remove the Yoast, – what will then happen to the sub-menu? How do I access that:

Yoast sub menu


>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="">

Move plugin-settings to 'Settings'-menu in the admin</a>
, , Zeth 2 months 0 Answers 15 views 0

Leave an answer