Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Changes WordPress "Posts" to be called "News Items" instead.
<?php
/*
news-items-instead-of-posts.php
Changes WordPress "Posts" to be called "News Items" instead.
Copy this code into your theme's functions.php file.
See comments here: http://markjaquith.wordpress.com/2010/11/12/post-formats-vs-custom-post-types/
*/
add_action('admin_menu','change_post_menu_label');
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 '';
}
add_action('init','change_post_object_label');
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
Something went wrong with that request. Please try again.