Forum Replies Created

Viewing 1 replies (of 1 total)
  • Newbie question here. Do I put this code in header.php? If so, can I edit it to read something like

    <!-- Already logged in redirect --><?php$current_user = get_currentuserinfo();if ( is_user_logged_in() && is_page('login')) { wp_redirect( home_url('/client/'. $current_user->user_login .'') ); exit; } else { ?><!-- end Redirect—>

    Right now when I try that, the whole site just breaks. If I remove the ‘else {‘ portion, the site works again, but the login page doesn’t. I know this question has been asked millions of times, but I can’t find the answer on the internet and I’ve been looking for hours! (Full disclosure: I do not know php, but I do know other languages).

Viewing 1 replies (of 1 total)