How to fix ‘WordPress redirection loop problem in wp-login.php page’?
How to fix ‘WordPress redirection loop problem in wp-login.php page’?
How to fix ‘WordPress redirection loop problem in wp-login.php page’?
You can use admin_init to get this done. This hook fires when an admin page is starting to load and you can use it to redirect the user to a different page. Like this: add_action(‘admin_init’,’wpse362882_redirect_login_page’); function wpse362882_redirect_login_page () { global $pagenow; if ( ($pagenow == ‘wp-login.php’) && is_user_logged_in() ) { .. do some stuff to … Read more
wp-admin – 404 after custom login form
Removing wp_login_viewport_meta
WordPress Register Form
A couple of things you could try Use a plugin like Rename wp-login.php and change what the VPN points to from wp-login.php to whatever you rename it Use plugin to handle the post password protection. I haven’t tried any, but there should be one out there that works without relying on wp-login.php. A few that … Read more
Have you tried creating a error? Something like: function wpse_23982_admin_notices() { if ( isset( $_GET[‘extendd-message’] ) && $_GET[‘extendd-message’] == ‘response_error’ ) { add_settings_error( ‘extendd-notices’, ‘extendd-remote-api-fail’, __( ‘There was an error connecting to extendd.com/. Please try again at another time.’, ‘extendd’ ), ‘error’ ); } } add_filter( ‘registration_errors’, ‘wpse_23982_admin_notices’ ); Then on the error do something … Read more
To redirect back to your custom login form after login fails try this code: // hook failed login add_action(‘wp_login_failed’, ‘my_front_end_login_fail’); function my_front_end_login_fail($username){ // Get the reffering page, where did the post submission come from? $referrer = add_query_arg(‘login’, false, $_SERVER[‘HTTP_REFERER’]); // if there’s a valid referrer, and it’s not the default log-in screen if(!empty($referrer) && !strstr($referrer,’wp-login’) … Read more
The init hook is too early, so the is_user_logged_in() check is failing. Try using the wp_head hook instead (with a -1 priority). The exit/die function will still prevent the page from loading, but will give you more access to key globals you may need to evaluate. Example: add_action( ‘wp_head’, array(&$this, “autologin”), -1);
Looks like you can, though I’ve never tried. After digging through wp-login.php and a few other files, I found my way to the sanitize_user function and filter. Here’s the function description from /wp-includes/formatting.php (on line 888 as of this writing): Removes tags, octets, entities, and if strict is enabled, will only keep alphanumeric, _, space, … Read more