Change Posts To Blogs (Post Type)
Thu Aug 10 2023 06:38:25 GMT+0000 (Coordinated Universal Time)
Saved by
@gshailesh27
function change_post_menu_label() {
global $menu, $submenu;
$menu[5][0] = 'Blogs';
$submenu['edit.php'][5][0] = 'All Blogs';
$submenu['edit.php'][10][0] = 'New Blog';
$submenu['edit.php'][16][0] = 'Blog Tags';
echo '';
}
add_action( 'admin_menu', 'change_post_menu_label' );
function change_post_object_label() {
global $wp_post_types;
$labels = &$wp_post_types['post']->labels;
$labels->name = 'Blog';
$labels->singular_name = 'Blog';
$labels->add_new = 'New Blog';
$labels->add_new_item = 'New Blog';
$labels->edit_item = 'Edit Blog';
$labels->new_item = 'New Blog';
$labels->view_item = 'View Blog';
$labels->search_items = 'Search Blog';
$labels->not_found = 'Not found';
$labels->not_found_in_trash = 'Not found in trash';
}
add_action( 'init', 'change_post_object_label' );
content_copyCOPY
Comments