WordPress Login Without Using WP-ADMIN

So this snippet is super useful if you do not want your users going to the wp-admin area of your site. First thing is to create the login form and placeholder login page for your users. Place the following code into your theme's functions.php
function custom_login_form() {
$args = array('redirect' => '/manage-account/'); // This is where you redirect your users to where ever you like.
wp_login_form($args);
}

add_shortcode('loginform', 'custom_login_form'); // You place this shortcode [loginform] onto a page in your wp-admin area
Once you have the shortcode, you can place a link in your header that goes to this custom login page that will look like a page.php page with a login form on it. When your users successfully login, they will be redirected to your custom welcome page that is not /wp-admin/. This is helpful as you do not have to restyle the wp-login.php page. In my example above, i have created a plugin that adds pages that replicate some of the backend functionality on the front end, so my users do not EVER need to go to wp-admin and lose the look and feel of my site.
Post a comment
  1. wordpress admin login

    [...] WordPress Login Without Using WP-ADMIN |… So this snippet is super useful if you do not want your users going to the wp-admin area of your site. [...]

  2. Tre

    I know this is a very old post, but do you mind sharing your plugin that adds pages that replicate some of the backend functionality on the front end, so my users do not EVER need to go to wp-admin and lose the look and feel of my site? That one thing I am trying to implement of some of my web site and it's not easy to find simple tutorial without relying on heavy plugin. I don't like using those heavy plugins people offer and sale most of the time while wordpress may have internal functions that could accomplish the same easily. Thanks for sharing.

    • Matthew Price

      Hi Tre I can certainly get you something in the next couple of days. Matt

  3. admin

    Hi Marko You are correct. you can replace "/manage-account/" with just a slash like this "/" that will redirect you to your homepage. Matt

  4. Marko

    Hello, How do I redirect them to homepage? Just remove /manage-account/ part and leave ''? Thanks






Real Time Web Analytics ^