WordPress Change default post label from admin menu

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' );

Leave a Comment

DON’T MISS OUR GIVEAWAYS!
Subscribe To Newsletter
Subscribe to our newsletter and get all the latest updates offers and giveaways right in your inbox.
Subscribe
Give it a try, you can unsubscribe anytime.
close-link

Join Free Giveaway!

Subscribe to our newsletter to get latest offers and giveaways!
SUBSCRIBE
close-link