WordPress.org

Support

Support » Plugins and Hacks » Hacks » Add new ID field in wp-login

Add new ID field in wp-login

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    @bcworkz

    The solution is fairly simple if you know how to hook actions and filters. Discovering this on my own was not so easy, you have to know where to look. I did not, and essentially stumbled on this solution by accident.

    To have another field show up on the login form, hook the action ‘login_form’ and simply echo out the HTML, and it will display after the default fields.

    To process the the submitted content of the field, hook the filter ‘authenticate’ and get the content from $_POST['your_field_name'] and do whatever needs doing with it.

    More on hooking actions and filters are in Plugin API. The techniques described work equally well from a child theme functions.php as they do from a plugin, so you can follow either path.

Viewing 1 replies (of 1 total)
  • The topic ‘Add new ID field in wp-login’ is closed to new replies.
Skip to toolbar