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

  • Author
  • #2712
     RonP
    Participant

    How do I get my site to log a user into the website front end and not the admin area ?

    #2742
     SQadmin
    Keymaster

    By default it should redirect to homepage not admin area, maybe you added some plugin?
    To redirect to their profile: https://archived.seventhqueen.com/forums/topic/redirect-user-to-their-profile-after-login

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2772
     RonP
    Participant

    I get a fatal error in the first two lines of 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*/
    }

    #2799
     SQadmin
    Keymaster

    I have just tested and no error for us. Sharing the error always helps

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
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?