Admin login fails
-
When I have following function in my functions.php, Admin login fails, When I try to login as admin from renamed admin url, it redirects me to front end user login page /member-login, won’t login as admin at all, but member login still works just fine.
add_filter(‘login_url’, ‘member_login_url’, 10, 2 );
// assuming that your new front end login url is “/member-login”, use these:
function member_login_url($login_url, $redirect) {
return site_url(‘/member-login/’);
}as the description suggests, This filter is used to change front end user login.
Can you please guide me how can i resolve this issue.
It’s not urgent but be grateful if you can help me resolve this as Clef won’t work with above function and without this function, my renamed admin login url would be exposed and standard member front end login won’t work.
I have more hooks/filters in functions.php to manage front end member login, but none of the others interfere with Clef. I have tried removing each and also all of the others together, still admin login won’t work alone with this filter present, as soon as I remove above function, Clef admin login works fine but my renamed wp-login url is exposed at member login link.
Thanks in advance.
- The topic ‘Admin login fails’ is closed to new replies.