wp-admin: Rename ‘Post’ to ‘Article’

Some sites require to rename the Posts menu item to something different. This snippet gets that part done. Adjust the ‘Article’ text to anything you want your default posts to be named.

/**
 * Snippet Name: wp-admin: Rename ‘Post’ to ‘Article’
 * Snippet URL: https://www.wpcustoms.net/snippets/wp-admin-rename-post-article/
 */
  function wpc_change_post_to_article( $translated ) {
$translated = str_ireplace('Post','Article',$translated );// ireplace is PHP5 only
return $translated;
}
// hook the translation filters
add_filter('gettext','wpc_change_post_to_article');
add_filter('ngettext','wpc_change_post_to_article'); 

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x