How to change the name of the “Posts” menu item in WordPress
I’m currently working on a WordPress powered website, and needed to change the name of the “Posts” post type to something more suitable for that particular website. I browsed around the web and found this code snippet on new2wp.com.
[php]
function change_post_menu_label() {
global $menu;
global $submenu;
$menu[5][0] = ‘News’;
$submenu[‘edit.php’][5][0] = ‘News’;
$submenu[‘edit.php’][10][0] = ‘Add News’;
$submenu[‘edit.php’][16][0] = ‘News Tags’;
echo ”;
}
function change_post_object_label() {
global $wp_post_types;
$labels = &$wp_post_types[‘post’]->labels;
$labels->name = ‘News’;
$labels->singular_name = ‘News’;
$labels->add_new = ‘Add News’;
$labels->add_new_item = ‘Add News’;
$labels->edit_item = ‘Edit News’;
$labels->new_item = ‘News’;
$labels->view_item = ‘View News’;
$labels->search_items = ‘Search News’;
$labels->not_found = ‘No News found’;
$labels->not_found_in_trash = ‘No News found in Trash’;
}
add_action( ‘init’, ‘change_post_object_label’ );
add_action( ‘admin_menu’, ‘change_post_menu_label’ );
[/php]
In this particular example, “Posts” are changed to “News”. Just put this code in your child themes functions.php file. Of course, don’t forget to put it in between php tags.
[php]
<?php (code here) ?>
[/php]
Very useful if you your website is not intended to be an ordinary blog. According to new2wp, this code was originally created by Mike Schinkel. Thanks Mike!
http://new2wp.com/snippet/change-wordpress-posts-post-type-news/