I'm trying to create a login page other than that of wp-admin, I want to create a custom one, and I can not use plugin, any hints or example how to do this?
I'm trying to create a login page other than that of wp-admin, I want to create a custom one, and I can not use plugin, any hints or example how to do this?
My friend, I already did this once and it was like this below:
<?php
global $user_login;
// Login form arguments. 'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
$args = array(
'echo' => true,
'redirect' => home_url( '/meu-painel/' ),
'form_id' => 'loginform',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'id_username' => 'user_login2',
'id_password' => 'user_pass2',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'value_username' => NULL,
'value_remember' => true
);
// Calling the login form.
wp_login_form( $args );
?>
Just insert this code where you want it in the template. Then you would only have to deal with the validation issue in case of an error.
See, after login, set the redirect to the "My Panel" page.
I hope it helps!