Skip to content

Roman Miranda

Web Developer

  • Home
  • Blog
  • Pages
    • Programming Stack
    • PHP Packages
    • Interesting Programming Articles

Wordpress

WordPress Snippet: Change user’s role by username or email address

February 10, 2023 by Roman Miranda

Here is a sample PHP code snippet to change the role of multiple users in WordPress based on their username: Replace [username1, username2, …] with the usernames of the users you want to change the role for and [new_role] with the new role you want to assign to the users. If you want to select … Read more

Categories Wordpress Leave a comment

Blog categories

  • bbPress (3)
  • Google Apps Script (2)
  • Laravel (3)
  • MySQL (1)
  • Notes (3)
  • PHP (1)
  • Tools (1)
  • Uncategorized (1)
  • Web Development (1)
  • Woocommerce Subscriptions (4)
  • Wordpress (1)
© 2023 Roman Miranda • Built with GeneratePress