-
Author
-
September 7, 2013 at 11:32 #2437SQadminKeymaster
Add this code snippet to sweetdate-child/functions.php
COPY CODE/* Filter the redirect url for login*/ add_filter("login_redirect","kleo_redirect_to_profile",100,3); function kleo_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(!is_super_admin($user->ID)) return bp_core_get_user_domain($user->ID ); else return $redirect_to_calculated; /*if site admin*/ }
You need to have your sweetdate-child theme activated
April 20, 2016 at 13:17 #117844victorParticipantDear SDAdmin,
Thank you for this code, though am yet to try it, because i have some more specific situation. i have attached a screenshot of the area(profile edit page) where i want each user to go immediately they login or register,which is their profile edit page, will this code be ok to take every user to their own personal profile edit page as shown in the picture and when they logout they should be redirected to the homepage or can you please give a code that can do this. The reason i want this is because when people register through the top register button or register form on header, the forms just accept their username,email and password to login for new users and so they miss the required fields like birthday,city etc, (and i really don’t like that ), i really want every user as they sign up to be able to fill the required field,and other field before they can login. Please i need your to help achieve this with a code snippet like this.Also how can the base background color be changed from grey to red in the profile edit page, in the attchement.
Thank you very much in advance.
Attachments:
You must be logged in to view attached files. -
AuthorPosts
You must be logged in to reply to this topic.