Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. function seed_login_redirect(){
  4. global $pagenow;
  5. if('wp-login.php' == $pagenow) {
  6. if(isset($_POST['wp-submit']) || // in case of LOGIN
  7. (isset($_GET['action']) && $_GET['action']=='logout') || // in case of LOGOUT
  8. (isset($_GET['checkemail']) && $_GET['checkemail']=='confirm') || // in case of LOST PASSWORD
  9. (isset($_GET['checkemail']) && $_GET['checkemail']=='registered')) return; // in case of REGISTER
  10. else wp_redirect(home_url('/account/')); // or wp_redirect(home_url('/login'));
  11. exit();
  12. }
  13. }
  14. add_action('init','seed_login_redirect');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement