Redirecting to page after login
-
Hi.
I need to know, how I can redirect users after login from main (not admin) page to other? I think, I must get current user state, then I must write something like
if (is_user_logged_in() && <strong>UNKNOWN_FUNC()</strong>) { global $current_user; get_currentuserinfo(); $user_info = get_userdata($current_user->ID); if ( $user_info->user_level == 0 ) { wp_redirect('<strong>MyPage</strong>', 301);; } }
but how?
Please, help =(
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Redirecting to page after login’ is closed to new replies.