Force Login Redirect Loop for Forgot Password
-
Hey there,
I’m having trouble with a redirect loop when trying to use the forgot password link.
I have created a custom login page and set up a separate redirect to redirect wp-login.php to my custom login page which is working fine.
When I disable the Force Login plugin on my site then my ‘Lost Password’ link works perfectly.
Here are my urls:
Login Page: https://printforge.co.za/harcourts/login
Lost Password: https://printforge.co.za/harcourts/lost-passwordI’ve added the below code to my functions.php thinking it would fix the problem but it’s still not working. I’m not sure where I’m going wrong. Please help.
function my_forcelogin_bypass( $bypass, $visited_url ) { // Allow all single posts if ( is_single() ) { $bypass = true; } // Allow these absolute URLs $allowed = array( home_url( '/lost-password/' ), ); if ( ! $bypass ) { $bypass = in_array( $visited_url, $allowed ); } return $bypass; } add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 2 );
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Force Login Redirect Loop for Forgot Password’ is closed to new replies.