Viewing 1 replies (of 1 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @vasilis4sar

    You can add this code snippet at the end of your theme’s functions.php file:

    add_filter('login_redirect', function($redirect_to, $request, $user) {
      if ( is_a ( $user , 'WP_User' ) && $user->exists() && in_array( 'author', (array) $user->roles ) ) {
        $redirect_to = 'https://your-domain.com/'; // Change this to the correct URL
      }
    	return $redirect_to;
    }, 10, 3);

    and adjust it as you want.

    Best

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress login’ is closed to new replies.