This topic has 1 reply, 2 voices, and was last updated 11 years by SQadmin.

  • Author
  • #2821
     yesh0810
    Participant

    Hi,

    I just want to how do I log in redirect to a page I’ve created? Please advice. Thanks!

    #2860
     SQadmin
    Keymaster

    Add this to your sweetdate-child/functions.php and change the url with your own:

    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 'http://MY_PAGE_URL';
        else
            return $redirect_to_calculated; /*if site admin*/
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How to redirect login to a page I've created?’ is closed to new replies.

Log in with your credentials

Forgot your details?