Title: Using admin-post.php for custom login
Last modified: August 30, 2016

---

# Using admin-post.php for custom login

 *  Resolved [unireyco](https://wordpress.org/support/users/unireyco/)
 * (@unireyco)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/using-admin-postphp-for-custom-login/)
 * I’ve built a custom front-end login for users but it uses `site.com/wp-admin/
   admin-post.php?string` to execute the registration. This plugin does it’s job
   well & 404 is shown.
 * Any tips how to make an exeption or maybe an idea for future update? Hook maybe?
 * [https://wordpress.org/plugins/wps-hide-login/](https://wordpress.org/plugins/wps-hide-login/)

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

 *  [Remy Perona](https://wordpress.org/support/users/tabrisrp/)
 * (@tabrisrp)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/using-admin-postphp-for-custom-login/#post-6537261)
 * Hello,
 * First time I hear about using admin-post.php for login/registration purpose, 
   since there is some core WP functions already there to handle it.
 * What would you like to see added to the plugin ?
 *  Thread Starter [unireyco](https://wordpress.org/support/users/unireyco/)
 * (@unireyco)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/using-admin-postphp-for-custom-login/#post-6537302)
 * I need to add few extra whistles to registration & default doesn’t let me to 
   add them (or I just haven’t found a way).
 * **So I make my own action:**
    1. I use `admin_url('admin-post.php?action=register_user');`
   as an action in register form.
 * 2. All I need to do is add `add_action('admin_post_nopriv_register_user', 'rr_register_user');`&
   according function both to functions.php or make a plugin.
 * _Exception inputs_ would be nice to have in settings where you can choose what
   URLs would this plugin avoid (whole URL with directories, query strings & everything
   so that it wouldn’t avoid blocking similar requests by accident).
    Question is
   if there should be few inputs or one with “add new” button that requires some
   hassle with JS/jQuery/ajax but would be much more flexible.
 * It would be great feature because that’s the only reason all “hide login” plugins
   suck in my opinion – it takes some functionality away from WP.
 * Not sure how this plugin works & Im not very experienced but just a basic idea:
 *     ```
       $exceptions = ( 'first-input' , 'second-input' , 'and-so-on' );
   
       if( ! in_array( $_SERVER['REQUEST URI'] , $exceptions ) ) {
   
          //do the stuff that this amazing plugin does
   
       }
       ```
   
 * Let me know what you think about that kind of feature.
    Cheers!

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

The topic ‘Using admin-post.php for custom login’ is closed to new replies.

 * ![](https://ps.w.org/wps-hide-login/assets/icon-256x256.png?rev=1820667)
 * [WPS Hide Login](https://wordpress.org/plugins/wps-hide-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wps-hide-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wps-hide-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wps-hide-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wps-hide-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wps-hide-login/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [unireyco](https://wordpress.org/support/users/unireyco/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/using-admin-postphp-for-custom-login/#post-6537302)
 * Status: resolved