Menu

How to rename the default Posts label in the WordPress dashboard

This quick tutorial will show you how to rename the default Posts label in the WordPress dashboard in just one, simple step.

Here’s a screenshot of the end result:

wordpress change default posts to news in dashboard screenshot

We can achieve this by adding function to your WordPress theme and only takes a few minutes.

Note that this doesn’t change the default post type’s slug or have any impact on your user experience since this is only a label change. It doesn’t affect the post type itself.

This example relabels Posts to News simply to provide a more consistent experience for content writers when navigating in WordPress when your default post type is being used for news articles.

To relabel Posts in your WordPress dashboard, open your theme’s functions.php file and add the following code:

// Change POSTS to NEWS in WP dashboard
add_action( 'admin_menu', 'pilau_change_post_menu_label' );
add_action( 'init', 'pilau_change_post_object_label' );
function pilau_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 pilau_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';
}   

Of course, if you wish to use Blog or something else, replace News with your preferred label.

Save your changes and upload to your theme’s parent directory.

Have fun!

Archived under:
Share:
This site uses cookies to collect basic info to help improve your experience. Read my Privacy Policy Accept