Would it be possible to remove both the login and password fields from the login/registration form?

I'm currently trying to implement logging in/registration for my users using this plugin: https://wordpress.org/plugins/oa-social-login/

It allows them to login/register with an account from a few different websites.

If possible I'd like to keep the standard login for admins and staff so they don't have to use their social accounts, which in the event that they might be compromised, could end up locking them out of the backend, unable to perform maintenance tasks, etc.

1 Answer 1


Your best bet would be to hook register_form. It will require parsing the html and removing elements manually, something like this should point you in the right direction.

function removeFormElements(){
    $form = ob_get_contents();
    //manipulate $form to remove the elements with something like either regex or the php DOM parser
    echo $form;
add_action('register_form', 'removeFormElements');

I believe your oAuth plugin is probably handling what needs to be done in the registration_errors hook to allow a registration without a username/password, but if it isn't you would also need a function to prevent an error from being thrown due to a lack of required input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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