Last Updated: February 25, 2016
·
616
· derekshirk

Change default WordPress menu names

This is a helpful function I have been using to easily change the names of default menu items such as Posts or Media. I mainly use this to change the name of 'Posts' to something else such as 'News' which I used in this example:

function menu_item_text( $menu ) {
$menu = str_ireplace( 'Posts', 'News', $menu );
return $menu;
}
add_filter('gettext', 'menu_item_text');
add_filter('ngettext', 'menu_item_text');