This topic has 3 replies, 2 voices, and was last updated 11 years by adam.

  • Author
  • #3405
     Santos Ramos
    Participant

    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!

    #3406
     adam
    Participant

    Copy 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.

    #3410
     Santos Ramos
    Participant

    Thanks 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

    #3411
     adam
    Participant

    No, do not delete functions.php from Sweetdate after you copy it to the child theme. That error is strange. I will let the author respond to that.

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?