Skip to content

Instantly share code, notes, and snippets.

@Korveld
Created January 6, 2019 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Korveld/d02bceaf7505189a03c081a6a2691a7a to your computer and use it in GitHub Desktop.
Save Korveld/d02bceaf7505189a03c081a6a2691a7a to your computer and use it in GitHub Desktop.
function wpse_custom_menu_order( $menu_ord ) {
if ( !$menu_ord ) return true;
return array(
'index.php', // Dashboard
'separator1', // First separator
'edit.php', // Posts
'upload.php', // Media
'link-manager.php', // Links
'edit-comments.php', // Comments
'edit.php?post_type=page', // Pages
'separator2', // Second separator
'themes.php', // Appearance
'plugins.php', // Plugins
'users.php', // Users
'tools.php', // Tools
'options-general.php', // Settings
'separator-last', // Last separator
);
}
add_filter( 'custom_menu_order', 'wpse_custom_menu_order', 10, 1 );
add_filter( 'menu_order', 'wpse_custom_menu_order', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment