Skip to content

Instantly share code, notes, and snippets.

@seafarer
Last active December 20, 2015 03:59
Show Gist options
  • Select an option

  • Save seafarer/6067725 to your computer and use it in GitHub Desktop.

Select an option

Save seafarer/6067725 to your computer and use it in GitHub Desktop.
Reorder wordpress admin menu
function custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php', // Dashboard
'separator1', // First separator
'edit.php?post_type=page', // Pages
'edit.php?post_type=project', // Custom post type project
'edit.php?post_type=accolade', // Custom post type accolade
'edit.php', // Posts
'edit-comments.php', // Comments
'upload.php', // Media
);
}
add_filter('custom_menu_order', 'custom_menu_order'); // Activate custom_menu_order
add_filter('menu_order', 'custom_menu_order');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment