Last active
December 30, 2015 11:59
-
-
Save blainerobison/8bb58aa33089f729ffdd to your computer and use it in GitHub Desktop.
wp: Order admin menu items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Order Admin Menu Items | |
*/ | |
function custom_menu_order( $menu_ord ) { | |
if ( ! $menu_ord ) { | |
return true; | |
} | |
return array( | |
'index.php', // Dashboard | |
'edit.php?post_type=page', // Pages | |
'edit.php?post_type=your_custom_post_type_name', // Custom type one | |
'edit.php?post_type=your_custom_post_type_name', // Custom type two | |
'edit.php?post_type=your_custom_post_type_name', // Custom type three | |
'separator1', // First separator | |
'edit.php', // Posts | |
'upload.php', // Media | |
'link-manager.php', // Links | |
'edit-comments.php', // Comments | |
'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', '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