For some sites you may never want to provide the standard WordPress login form.  An example of this might be a site that requires a custom OAuth login flow.

In any case, if you’ve found this blog post then you have your own reasons for disabling the login form.  Below is a simple approach to get you started. This code will hook into WordPress right before the login form is shown, and cleanly stops the execution of the rest of the page.

Also included in this approach is a mechanism for providing a secret url that you can use to see the normal login form, in case of an emergency.

About the Author

Jonathan Daggerhart

Long time Drupal and WordPress developer. I like to write modules and plugins, and I dabble in frontend and design.

Leave a Reply

Your email address will not be published. Required fields are marked *