This topic has 3 replies, 4 voices, and was last updated 7 years by Artem.

  • Author
  • #2437
     SQadmin
    Keymaster

    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

    #117844
     victor
    Participant

    Dear 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.
    #143456
     Roader
    Participant

    I need this, but, this code does not work.

    #147677
     Artem
    Participant

    Please check my pictures, I did add the code but it isn’t working for me? Can anybody help?

    Attachments:
    You must be logged in to view attached files.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?