Is it possible to reorder plugin menu items and custom admin items in the Admin menu without modifying the position in the plugin itself?

I've tried using the method described here "Changing the Menu Order", but when you add a page link like admin.php?page=pluginname, it doesn't do anything. Guessing because it can't overwrite the position defined within the plugin.

The Admin Menu Editor plugin works alright, but needing a plugin-less method to handle it to satisfy the higher-powers. :/

Anyone know of a way to get at this? Any help would be hugely appreciated!

  • Post the code you've tried please, even if it doesn't work.
    – s_ha_dum
    Commented Jun 7, 2013 at 21:57

1 Answer 1


Try taking just the name from the page admin link and see if it works. Something like this:

function custom_menu_order($menu_ord) {
    if (!$menu_ord) return true;

    return array(
        'index.php', // Dashboard
        'separator1', // First separator
        'edit.php', // Posts

        'pluginname2', // Take the name from the page menu admin.php?page=pluginname2

        'upload.php', // Media
        'edit.php?post_type=page', // Pages
        'edit-comments.php', // Comments

        'pluginname', // Take the name from the page menu admin.php?page=pluginname

add_filter('custom_menu_order', 'custom_menu_order'); // Activate custom_menu_order
add_filter('menu_order', 'custom_menu_order');
  • Ha! It's always something simple, isn't it! Many thanks there @Syrehn! Commented Jun 8, 2013 at 4:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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