To change the login link only in this template, replace the wp_login_url()
function call with your login link:
'must_log_in' => '<p class="must-log-in">' . sprintf(
/* translators: %s: login URL */
__( 'You must be <a href="https://wordpress.stackexchange.com/questions/258398/%s">logged in</a> to post a comment.' ),
"https://yourdomain.com/my-account"
) . '</p>',
If you want to generally redirect users to another url if they need to log in, it is better to use the filter login_url
:
function wpse_258398_login_url ( $login_url, $redirect, $force_reauth ) {
return "https://yourdomain.com/my-account";
}
add_filter( 'login_url', 'wpse_258398_login_url', 10, 3);
Be aware though, this will affect all redirects to login. Even when you are redirected to login for the admin backend.