WordPress – Change the Default Post label from all area in Backend

We can change the default Post label from all the section in the WordPress admin panel. Since wordpress uses Post as the default type, it will show Post in all the areas and tabs, search etc.
We can change the Label to a custom Name. For eg. if we are changing the default post type to “News”, (Changing of Post Label from admin menu described in another post) Please add the following code in the function.php file

function change_post_type_labels() {
  global $wp_post_types;

  // Get the post labels
  $postLabels = $wp_post_types['post']->labels;
  $postLabels->name = 'News';
  $postLabels->singular_name = 'News';
  $postLabels->add_new = 'Add News';
  $postLabels->add_new_item = 'Add News';
  $postLabels->edit_item = 'Edit News';
  $postLabels->new_item = 'News';
  $postLabels->view_item = 'View News';
  $postLabels->search_items = 'Search News';
  $postLabels->not_found = 'No News found';
  $postLabels->not_found_in_trash = 'No News found in Trash';
}
add_action( 'init', 'change_post_type_labels' );

Sharing is caring!

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