After we published a guide on how to remove unwanted dashboard items from your admin panel, we’ll be showing you another productivity hack that can help you improve the user experience with WordPress. Using this hack, you can personalize the order of your WordPress dashboard menu items in such a way that the most used menu comes at the top.
Take a WordPress backup before you proceed just in case you make a mistake and need to revert the code.
Code tweak: WordPress Customize Admin Menu
For personalizing your dashboard menu, simply open your functions.php file, add the below code to the file and save it.
// CUSTOMIZE ADMIN MENU ORDER
function custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php',
'upload.php',
'plugins.php',
'edit-comments.php',
'edit.php?post_type=page',
'edit.php',
);
}
add_filter('custom_menu_order', 'custom_menu_order');
add_filter('menu_order', 'custom_menu_order');
Before implementing the tweak, this is what the WordPress dashboard menu looked like.
This is how it looks after adding the above code snippet to the functions.php file.
WordPress Menu items explanation
Every user is different and will require a unique personalized order for their WordPress dashboard menu items. Look carefully at what each line inside the return array() means so that you can customize the order as per your preference (or your end users preference).
- index.php- To display dashboard
- upload.php- To display media
- plugins.php- To display plugins
- edit-comments.php- To display comments
- edit.php?post_type=page- To display pages
- edit.php- To display posts
Did you find the above code useful? Share your thoughts with us below. Also if you're interested in other WordPress tips and tricks, check out our listing of more than 101 WordPress tricks here.
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!
Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.