Skip to content

Instantly share code, notes, and snippets.

@ixkaito
Created February 3, 2016 21:13
Show Gist options
  • Save ixkaito/5e3949938deb72e04f1d to your computer and use it in GitHub Desktop.
Save ixkaito/5e3949938deb72e04f1d to your computer and use it in GitHub Desktop.
WordPress Custom Menu Order
<?php
function custom_menu_order( $menu_order ) {
return array(
'index.php', // Dashboard
'separator1', // Separator 1
'edit.php', // Posts
'upload.php', // Media
'edit.php?post_type=page', // Pages
'edit-comments.php', // Comments
'separator2', // Separator 2
'themes.php', // Appearance
'plugins.php', // Plugins
'users.php', // Users
'tools.php', // Tools
'options-general.php', // Settings
'separator-last', // Separator 3
);
}
add_filter( 'custom_menu_order', '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