Hi gurus, In wordpress Is there a way to redirect user to his/her own author page after login? Thanks so much, dBuggr
/*Aggiunge un filtro per reindirizzare l'URL login*/ add_filter("login_redirect","gangmei_redirect_to_profile",100,3); function gangmei_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user) { /*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/ if(empty($redirect_to_calculated)) $redirect_to_calculated=admin_url(); /*if the user is not site admin,redirect to his/her profile*/ if(!is_admin($user->user_login)) return get_author_posts_url($user->ID,$curauth->user_login); else return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/ } Code (markup):