WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to disable changing password option for all my subscriber users.

Is it possible by doing any code tweak or something using any plugin?

Disable password changing option for subscriber users

If someone has any idea or plugin knowledge to do this then appreciated.

share|improve this question
up vote 2 down vote accepted

You can try

if( current_user_can( 'subscriber' ) ) {
    add_filter( 'show_password_fields', '__return_false' );

see also http://wpengineer.com/2285/disable-password-fields-for-non-admins/


share|improve this answer
where do i put this code? in any theme specific file? In functions.php right. – Frank Apr 8 '13 at 8:02
Yes, here (and in most case when you need to add code), it's likely to be in functions.php. Never tweak core files, unless you knwo what you're doing. – user29296 Apr 8 '13 at 8:24
Thanks, you made my day. – Frank Apr 8 '13 at 8:46

If you want to hide the passwords fields on the profile page, you can use the show_password_fields filter

function hide_password_wpse_94968() {
        // hide only for subscribers
        return false;
    return true; // for all other users that can edit posts

where we hide it for all users that can't edit posts (subscribers).

The subscribers will still be able to retrieve new passwords via wp-login.php?action=lostpassword.

Before hiding the passwords fields:

Before hiding

After hiding the passwords fields:

enter image description here

share|improve this answer
Thanks for the help. I got it. – Frank Apr 8 '13 at 8:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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