Skip to content

Instantly share code, notes, and snippets.

@raideus
Created July 16, 2012 13:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save raideus/3122742 to your computer and use it in GitHub Desktop.
Save raideus/3122742 to your computer and use it in GitHub Desktop.
Re-order WordPress Admin menu items
<?php
/**
* Re-orders tabs in the WordPress Admin menu. Include this in the functions.php file of your theme.
*/
function gs_custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php',
'separator1',
'edit.php?post_type=page',
'edit.php',
);
/* -- DEFAULTS -- */
/*
return array(
'index.php',
'separator1',
'edit.php?post_type=page',
'edit.php',
'edit.php?post_type=[your_post_type_slug]',
'upload.php',
'link-manager.php',
'edit-comments.php',
'separator2',
'themes.php',
'plugins.php',
'users.php',
'tools.php',
'options-general.php'
);
*/
}
add_filter('custom_menu_order', 'gs_custom_menu_order');
add_filter('menu_order', 'gs_custom_menu_order');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment