title: registartion form on wordpress
body: <p>I am trying to hide wordpress login\register\lostpassword\logout forms and redirect to my own pages
  I have tried this </p>
  
  <pre><code>add_action('init','possibly_redirect');
  
  function possibly_redirect(){
   global $pagenow;
   if( 'wp-login.php' == $pagenow ) {
    wp_redirect('http://google.com/');
    exit();
   }
  }
  </code></pre>
  
  <p>but this will redirect all pages to 1 page i want to edit individuals like registration and lost password each to redirect elsewhere so I tried this</p>
  
  <pre><code>/* שינוי עמוד התחברות *//**
  /*התחברות*/
  function possibly_redirect(){
    global $pagenow;
    if( 'wp-login.php' == $pagenow ) {
      if ( isset( $_POST['wp-submit'] ) || //  this is line 33
      else wp_redirect( home_url('/%D7%94%D7%AA%D7%97%D7%91%D7%A8/') ); // or wp_redirect(home_url('/login'));
      exit();
    }
  }
  add_action('init','possibly_redirect');
  /*התנתקות*/
  function possibly_redirect(){
    global $pagenow;
    if( 'wp-login.php' == $pagenow ) {
      if ( isset($_GET['action']) &amp;&amp; $_GET['action']=='logout') ||   // in case of LOGOUT
      else wp_redirect( home_url() ); // or wp_redirect(home_url('/login'));
      exit();
    }
  }
  add_action('init','possibly_redirect');
  /*איפוס יסמא*/
  function possibly_redirect(){
    global $pagenow;
    if( 'wp-login.php' == $pagenow ) {
      if ( isset($_GET['checkemail']) &amp;&amp; $_GET['checkemail']=='confirm') ||   // in case of LOST PASSWORD
      else 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();
    }
  }
  add_action('init','possibly_redirect');
  /*הרשם*/
  function possibly_redirect(){
    global $pagenow;
    if( 'wp-login.php' == $pagenow ) {
      if ( isset($_GET['checkemail']) &amp;&amp; $_GET['checkemail']=='registered') ) return;    // in case of REGISTER
      else 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');
  </code></pre>
  
  <p>dont get me wrong I have no idea how to write php I took this from some searches and tried to play around so it works... but it does not work... sometimes it shows an error</p>
  
  <pre><code>Parse error: syntax error, unexpected T_ELSE in /home/content/11/9595411/html/luachmodaot/wp-content/themes/boozurk/functions.php on line 33
  </code></pre>
  
  <p>can someone help me out with this please?</p>