Customize admin menu order

WordPress Tutorial – Adding this PHP code to the functions.php of your wordpress theme will allow you to customize the order of the admin menu items.



function custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php', // this represents the dashboard link
'edit.php?post_type=events', // this is a custom post type menu
'edit.php?post_type=page', // this is the default page menu
'edit.php', // this is the default POST admin menu
add_filter('custom_menu_order', 'custom_menu_order');
add_filter('menu_order', 'custom_menu_order');

Leave a comment