Custom login url only for frontend visitor
-
Hi,
I have tried to use the following function to redirect frontend visitors to my custom login page.
// Custom Login URL For Frontend Visitors
function my_login_page( $login_url, $redirect ) {
return site_url( ‘/custom-login/?redirect_to=’ . $redirect );
}
add_filter( ‘login_url’, ‘my_login_page’, 10, 2 );However, when I tried to access the WP admin panel / backend via wp-admin, I’m getting a blank screen.
Could you point me to the right direction?
Thank you so much.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom login url only for frontend visitor’ is closed to new replies.