I’m utilizing the entrance finish type submission. It really works on localhost completely, nevertheless it’s not working when my website is dwell. It exhibits the “success message”, however initially it is not logged in. That is my code:
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'log-in' ) :
international $error;
$login = wp_login( $_POST['user-name'], $_POST['password'] );
$login = wp_signon( array( 'user_login' => $_POST['user-name'], 'user_password' => $_POST['password'], 'bear in mind' => $_POST['remember-me'] ), false );
if (!$error) {
save_message( 'success', __( 'You've got efficiently Login.', 'frontendprofile' ) );
unset($_POST);
wp_redirect( get_permalink( 4 ) );
}
// wp_redirect( home_url() );
endif;
So what can I do to repair this?