Create a gist now

Instantly share code, notes, and snippets.

Changes WordPress "Posts" to be called "News Items" instead.
Changes WordPress "Posts" to be called "News Items" instead.
Copy this code into your theme's functions.php file.
See comments here:
function change_post_menu_label() {
global $menu;
global $submenu;
$menu[5][0] = 'News Items';
$submenu['edit.php'][5][0] = 'News Items';
$submenu['edit.php'][10][0] = 'Add News Item';
$submenu['edit.php'][16][0] = 'News Item Tags';
echo '';
function change_post_object_label() {
global $wp_post_types;
$labels = & $wp_post_types['post']->labels;
$labels->name = 'News Items';
$labels->singular_name = 'News Item';
$labels->add_new = 'Add News';
$labels->add_new_item = 'Add News Item';
$labels->edit_item = 'Edit News Item';
$labels->new_item = 'News Item';
$labels->view_item = 'View News Item';
$labels->search_items = 'Search News Item';
$labels->not_found = 'No News Items found';
$labels->not_found_in_trash = 'No News Items found in Trash';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment