Rename Admin Posts Menu items WordPress Without Plugin

You can rename admin menu items. 100% working solutions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 New';
    $submenu['edit.php'][15][0] = 'Categories'
    $submenu['edit.php'][16][0] = '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 New';
        $labels->add_new_item = 'Add New';
        $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' );

Related Posts


How to Retain Local Storage When Changing WooCommerce Payment Method?

When users switch payment methods on the WooCommerce checkout page, local storage data may reset, ca...

“Maximum Available Quantity Has Been Added to Cart” Error in WooCommerce

Seeing the “Maximum available quantity has been added to cart” error in WooCommerce? Thi...

How to Retrieve and Expose Gutenberg & Theme-Generated CSS in WordPress

If you want to extract the CSS generated by Gutenberg and your WordPress theme, you can do so using ...

Limit total quantity globally for specific product category in WooCommerce

To limit the total quantity globally for a specific product category in WooCommerce, you can use a c...