Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author weDevs

    (@wedevs)

    Hello,

    I am not clear about your question, can you please provide a screenshot about what you are trying to do?

    Thread Starter Zee

    (@gphx)

    Please see image here: http://oi57.tinypic.com/19s202.jpg

    I basically want to hide all other user roles from the dropdown list, except ‘Customer’. Is this possible? Thanks!

    Plugin Author weDevs

    (@wedevs)

    Copy and paste this code on your themes function.php

    add_filter( 'editable_roles', 'my_set_role' );
    function my_set_role( $all_roles ) {
        unset($all_roles['administrator']);
        unset($all_roles['editor']);
        return $all_roles;
    }

    Here I have removed two user roles Admin and Editor. You can add some more same way if you want to remove more roles.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide other user roles’ is closed to new replies.