Content & Posts PHP Beginner

Rename “Posts” to “Articles” in the Admin

Change the word "Posts" to "Articles", "News" or anything else throughout the admin menu, screens and buttons.

Tested on WordPress 7.1 PHP 8.3 No plugin needed Updated
functions.php 23 lines
add_filter( 'post_type_labels_post', function ( stdClass $labels ): stdClass {
	$single = 'Article';
	$plural = 'Articles';

	$labels->name               = $plural;
	$labels->singular_name      = $single;
	$labels->add_new_item       = "Add New $single";
	$labels->edit_item          = "Edit $single";
	$labels->new_item           = "New $single";
	$labels->view_item          = "View $single";
	$labels->view_items         = "View $plural";
	$labels->search_items       = "Search $plural";
	$labels->not_found          = "No " . strtolower( $plural ) . " found.";
	$labels->not_found_in_trash = "No " . strtolower( $plural ) . " found in Trash.";
	$labels->all_items          = "All $plural";
	$labels->archives           = "$single Archives";
	$labels->menu_name          = $plural;
	$labels->name_admin_bar     = $single;
	$labels->item_published     = "$single published.";
	$labels->item_updated       = "$single updated.";

	return $labels;
} );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

If your team calls them articles, news or stories, seeing “Posts” everywhere in the admin is a small but constant mismatch. This snippet renames them.

How it works

WordPress builds every label for a post type from one set of names. The post_type_labels_post filter changes those names for the built-in Post type, so the menu, screen titles, buttons and messages all update together.

Things to watch

  • Only labels change. URLs, the post type name post and your content stay the same.
  • Some plugins hard-code the word “Posts” in their own screens.

How to test it

Check the admin menu: “Posts” should now read “Articles”, and Add New should say “Add New Article”.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only