WordPress by default will save each item as posts, so the admin menu will show Posts in the side bar for adding new items and all. Some times in the case of customization we need to change the labels to our custom name.

For example if are using wordpress site to add news and we need to change the text in the admin menu to “News”. Put the following code in the function.php file

function change_post_menu_text() {
  global $menu;
  global $submenu;

  // Change menu item
  $menu[5][0] = 'News';

  // Change post submenu
  $submenu['edit.php'][5][0] = 'News';
  $submenu['edit.php'][10][0] = 'Add News';
  $submenu['edit.php'][16][0] = 'News Tags';

add_action( 'admin_menu', 'change_post_menu_text' );

Categorized in:

Webtips, Wordpress,