-
Author
-
September 27, 2013 at 02:32 #3405Santos RamosParticipant
Hello,
I’m new to wordpress and I need to edit the chid theme!
Where do I add the code and to what page?
Im trying to add the code below.
Redirect user to their profile after login
https://archived.seventhqueen.com/forums/topic/redirect-user-to-their-profile-after-login
/* 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*/
}Thanks for the help!
September 27, 2013 at 02:38 #3406adamParticipantCopy the whole wp-content/themes/sweetdate/functions.php file to wp-content/themes/sweetdate-child/functions.php, open it up and add that code snippet somewhere above ?> which is the last line of code.
September 27, 2013 at 03:18 #3410Santos RamosParticipantThanks for the help!
I want to make sure I do this right!
I got an error after I copied the functions.php file from sweetdate to sweet date-child.
Do I need to delete the functions.php from sweetdate after I copy the file to the child?
Here is the error.
Warning: require_once(framework/constants.php) [function.require-once]: failed to open stream: No such file or directory in /home3/santosra/public_html/ridepond.com/wp-content/themes/sweetdate-child/functions.php on line 41
Fatal error: require_once() [function.require]: Failed opening required ‘framework/constants.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home3/santosra/public_html/ridepond.com/wp-content/themes/sweetdate-child/functions.php on line 41
-
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.