How To Customize the Admin Menu Order

Snippets by IsItWP

Are you looking for a way to customize the admin menu order? This snippet will allow you to change the order of the admin menu items.


  1. Add this code to your theme’s functions.php file or in a site-specific plugin.
  2. Edit the order of the strings in the returned array on lines 4 through 13 to change the order of the admin menu items.
   function custom_menu_order($menu_ord) {
       if (!$menu_ord) return true;
       return array(
        'index.php', // this represents the dashboard link
        'edit.php?post_type=events', // this is a custom post type menu
        'edit.php?post_type=page', // this is the default page menu
        'edit.php', // this is the default POST admin menu 
   add_filter('custom_menu_order', 'custom_menu_order');
   add_filter('menu_order', 'custom_menu_order');

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: How to Properly Create a Custom Login Page in WordPress (Step by Step).

Comments   Leave a Reply

  1. Do I have to past it into a specific place in the functions.php? I am using the theme Twenty Thirteen and it’s not working for me.

  2. Thanks, it worked like a charm!!! I really didn’t like the default WP Admin order, or top level menu names for that matter, so with the help of your code and another tutorial, I got it pretty much just the way I want it. I think it’s going to be more user-friendly and intuitive for my clients.


  3. Hi Kevin!
    How can I include a menu created by a plug-in into the array?
    I’m trying “admin.php?page=chat” but doesn’t work.


    1. I’m having the same problem!

    2. Solved!! Instead of “admin.php?page=chat” put only “chat” – Simple as that!

      1. doesn’t work for me =(

  4. Harish Chouhan June 12, 2011 at 10:35 pm

    Hello, Thanks for the script, just one question?

    When using above code, all menus appear below each other. Is there a way to add the divider after few menus just like the default menu in WordPress?

    1. Yes you can do this however it is a little bit of work to get things right. I found a tutorial online that should help you get things going. 


      1. It’s actually really easy if you can live with the default number of separators (i.e. two) – just use ‘separator1’ and ‘separator2’ in the array instead of a php filename.

  5. Perfect! Most elegant solution on Google, so far

    1. Thanks glad I could help out.

  6. Tweets that mention Wordpress Customize admin menu order – wpsnipp.com Wordpress code snippets for your blog -- Topsy.com December 28, 2010 at 5:33 pm

    […] This post was mentioned on Twitter by WPSNIPP. WPSNIPP said: #wordpress Customize admin menu order http://bit.ly/hLr3ga #blog please RT 🙂 […]

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!