This topic has 5 replies, 2 voices, and was last updated 10 years by rudik2.

  • Author
  • #16883
     rudik2
    Participant

    Hi,
    i would like to user after login will be redirect to members page. How to make it?
    Please help

    #17148
     rudik2
    Participant

    Please help

    #17349
     Abe
    Keymaster

    this topic is in the FAQ section: 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

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #17418
     rudik2
    Participant

    Abe i would like redirect to MEMBERS page (members list) , not to profile 🙂 Please help.

    #17786
     Abe
    Keymaster

    then just change the code:

    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://mysite.com/members';
        else
            return $redirect_to_calculated; /*if site admin*/
    }
    

    replace http://mysite.com/members with your own
    This needs basic PHP/WORDPRESS knowledge

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

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #17818
     rudik2
    Participant

    Workin good thank you.

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

The topic ‘How to redirect user after login to members page?’ is closed to new replies.

Log in with your credentials

Forgot your details?