Ok, I've been searching for over an hour for something I thought (and still think) is pretty simple. I need to change the title Users to Customers in the admin for a client. I can and have easily hooked into the menus and changed it there. But it still shows up as Users on the main users page or when you add a new user (Add new User should be Add New Customer).

I tried something like this in an init action but no dice ...

$labels = &$wp_post_types['users']->labels;
$labels->name = 'Customer';

I've got to be missing some very simple filter. Thanks for your help!

  • 1
    If you mean users.php and user-new.php, then 'users' are not post type; 'users' have its own table. And you can use the gettext filter to modify the text 'User'/'Users'/etc. Just search for __() and _e() calls in the relevant PHP file. – Sally CJ Nov 21 '19 at 6:35
  • 1
    Simple. I've had my head in custom post types so much for this project I wasn't thinking. Thank you! – K_C Nov 21 '19 at 15:35

As suggested by Sally CJ in the comments. gettext was the easiest and fastest way to make this possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.