Add content in wp login page
https://codex.wordpress.org/Customizing_the_Login_Form Check out the “Make a Custom Login Page” section. wp_register(”, ”); // Display “Site Admin” link. Replace this bit with a link to your custom registration page.
https://codex.wordpress.org/Customizing_the_Login_Form Check out the “Make a Custom Login Page” section. wp_register(”, ”); // Display “Site Admin” link. Replace this bit with a link to your custom registration page.
I am speculating here after reviewing your logic/comments above, yet let’s try as follows Possible issue: During login, although you are setting the auth cookie, you are not setting the current user and this is potentially the cause of the break-down upon logout due to is_user_logged_in returning a false-positive/negative result. Possible resolution: In your validation-room.php … Read more
Nested if/else/elseifs are usually too complex for me to figure out. I’d change your code to use SWITCH/CASE to determine proper input and to change the password if all is OK. And to sanitize $_POST (and $_GET) inputs, I just put this in my functions file: $_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING); $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); Then … Read more
Just before any of the frontend template loads, WordPress fires an action – template_redirect. You can use this action hook to show SAML login if user isn’t logged in. This way, you won’t have to put the condition in every template file. // you can place this code in your theme’s functions.php file. add_action( ‘template_redirect’, … Read more
Custom user roles are unable to login
Unable to login after registration
Login form does not store/remember/suggest users password
You can use additional parameters while redirecting users from front-end. i.e; http://yourdomain.com/wp-login.php?frontend=true And get this parameter to check and determine whether the users have been redirected from the front-end or not. if( isset($_GET[‘frontend’]) && $GLOBALS[‘pagenow’] === ‘wp-login.php’ ) { echo “<h2 id=’fr-msg’>Message To display</h2>”; } Use this code inside your function.php or in plugin. You … Read more
How to change default username field after login
you should do so: …} else { $site_url = get_site_url().”/myloginpage/”; $has_success = true; $message[] = “Successful registration”; global $wpdb; $key = $wpdb->get_row($wpdb->prepare(“SELECT ID,user_activation_key FROM $wpdb->users WHERE user_login = %s”,$usermobile)); add_user_meta($key->ID,’usermobilenum’,$usermobile); wp_set_current_user( $newUserID, $usermobile ); wp_set_auth_cookie( $newUserID ); //do_action( ‘wp_login’, $usermobile ); $redirecturl = site_url(‘/?signup=true&login=too’); wp_redirect( $redirecturl ); exit; } } } }