0

If I edit an individual user, the role dropdown menu has the option "— No role for this site —" (<option value="">— No role for this site —</option>):

enter image description here

However this option doesn't exist on the main Users page :

enter image description here

So how can I go about changing the role of a group of users to "No role for this site" without having to change each one individually?

  • You could handle it by filter editable_roles, here the approach with different case by @kaiser wordpress.stackexchange.com/a/53685/18731 – Jevuska Mar 16 '16 at 20:53
  • @Jevuska - Funny, on the codex page you linked to there's an example at the bottom that seems like it's supposed to do what I'm after. Yet after adding that code to my functions.php file, the new option shows up, yet nothing changes one you click the change button. – j08691 Mar 16 '16 at 21:01
  • Sure.. then you just need to figure it out in condtional statement and return them to array() only. Please, don't forget to update here if you have it. – Jevuska Mar 16 '16 at 21:14
  • If you're only wanting to do it once, and you're comfortable editing the database directly, you could possibly just do that too. – Tim Malone Jun 6 '16 at 6:04

Your Answer

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

Browse other questions tagged or ask your own question.