Depending on how you are using WordPress you may have given users the ability to register to your website. Now all you need is a simple and beautiful way to let them register. This snippet will provide a simple way of adding that login form. Just add the first snippet in the location of your theme you wish to display the login form.
<?php wp_login_form(); ?>
The following more advanced login snippet includes an array of arguments that you can use to customize your login form even more. Some options are the labels username, pass, and of course the login redirect URL so you can specify a specific page a user is sent to after login.
<?php $args = array( 'echo' => true, 'redirect' => 'http://wpsnipp.com', 'form_id' => 'loginform', 'label_username' => __( 'Username' ), 'label_password' => __( 'Password' ), 'label_remember' => __( 'Remember Me' ), 'label_log_in' => __( 'Log In' ), 'id_username' => 'user_login', 'id_password' => 'user_pass', 'id_remember' => 'rememberme', 'id_submit' => 'wp-submit', 'remember' => true, 'value_username' => NULL, 'value_remember' => false ); wp_login_form($args); ?>
Did you like this post? If so please share it with your friends. Thanks!