Change menu items and order in WordPress Admin

How can I change and re-order admin menu in WordPress?

Please see below a code exemple, to add to your plugin ou functions.php file:

<?php 
// Re-order left admin menu 
function wpster_custom_menu_order( $menu_ord ) { 
if ( !$menu_ord ) return true; 
return array( 'index.php', // Dashboard 
'separator1', // First separator 
'edit.php?post_type=page', // Pages 
'upload.php', // Media 
'notification_options', // Options notifications 
'separator2', // Second separator 
'users.php', // Users 
'separator-last', // Last separator 
'themes.php', // Appearance 
'plugins.php', // Plugins 
'tools.php', // Tools 
'options-general.php', // Settings 
); } 
add_filter( 'custom_menu_order', 'wpster_custom_menu_order', 10, 1 ); 
add_filter( 'menu_order', 'wpster_custom_menu_order', 10, 1 );
?>

Submit a Comment

Your email address will not be published.