see below for correct php code syntax, but i've no idea if it will work based on what you have given. Are you creating a theme yourself or modifying a theme?
you had a number of errors after the one you posted. Basically your if statement syntax was wrong - should be if(you exist && you == you) {do this please;} else {ok do this instead;} -- if you mess up the brackets you get an error. btw you dont need to check isset $var && $var == something, just check its equal to something, if its not, it will fail.
why do you want to redirect away from the pages? if its something as simple as styling you can do something like this https://premium.wpmudev.org/blog/create-a-custom-wordpress-login-page/. if you dont know php, it might be a place to start rather than creating your own method
function possibly_redirect(){
global $pagenow;
if( 'wp-login.php' == $pagenow ) {
if ( $_POST['wp-submit'] ) { // this is line 33 - the error was telling you had a open statement....syntax for if statement : if( ) { } else { }
wp_redirect( home_url('/%D7%94%D7%AA%D7%97%D7%91%D7%A8/') ); // or wp_redirect(home_url('/login'));
exit();
}
if( 'wp-login.php' == $pagenow ) {
if ( $_GET['action']=='logout') { // in case of LOGOUT
wp_logout();
wp_redirect( home_url() ); // or wp_redirect(home_url('/login'));
exit();
}
}
if( 'wp-login.php' == $pagenow ) {
if ( $_GET['checkemail']=='confirm') { // in case of LOST PASSWORD
wp_redirect( home_url('/%D7%90%D7%99%D7%A4%D7%95%D7%A1-%D7%A1%D7%99%D7%A1%D7%9E%D7%90/') ); // or wp_redirect(home_url('/login'));
exit();
}
}
if( 'wp-login.php' == $pagenow ) {
if ( $_GET['checkemail']=='registered' ) { //return;---> use in function only!!!!!!!!
wp_redirect( home_url('/%D7%94%D7%A8%D7%A9%D7%9E%D7%94/') ); // or wp_redirect(home_url('/login'));
exit();
}
}
}
add_action('init','possibly_redirect');