WordPress customization part 2 – Renaming dashboard menus

This is the part 2 of wordpress customization series. Sometimes guys you need to rename your wordpress dashboard menus as your convenience. Like if you want to change your Posts menu to Blog posts, you can do it easily with admin_menu hook.

First of all we go to functions.php  and create a custom function as follow.

Function rename_top_level_menus(){

global $menu;

$menu[5][0]="Blog Posts";


add_action('admin_menu',’ 'rename_top_level_menus');


In the above function we declare a global variable $menu which holds the all top level menus in the form of array.Associate this function with add_action hook with admin_menu action tag.

Renaming Sub menus

Function rename_sub_menus(){

global $menu;

global $submenu;

$menu[5][0]="Blog Posts";

$submenu['edit.php'][5][0]="All Blog Posts";



Menus and sub menus name, key, and slug Chart

WordPress customization part 3- Changing the order of dashboard menus


About Viren-Dra Yadav

Tech Enthlasis | Open Source Lover | Project Manager and DevOps Developer@EighteenPixels | Mad for Speed
View all posts by Viren-Dra Yadav →

Leave a Reply

Your email address will not be published. Required fields are marked *