Customize the order of the admin menu

This code will allow you to reorganize the order of elements in the admin menu. All that you need to do is click on an existing link in the admin menu and copy everything before the /wp-admin/ URL. The order below represents the order the new admin menu will have.

// CUSTOMIZE ADMIN MENU ORDER
 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=news',
         'edit.php?post_type=articles',
         'edit.php?post_type=faqs',
         'edit.php?post_type=mentors',
         'edit.php?post_type=testimonials',
         'edit.php?post_type=services',
         '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');
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s