Skip to:
Content
Pages
Categories
Search
Top
Bottom

changing the redirect page when I log in.

  • @haies

    Participant

    Hello,

    I need to change the redirect page that appear after logging in. I want it like when you access into your facebook account and the link “www.facebook.com” shows activities, avatar, notifications, messages… etc.

    Note that:
    1. if you are suggesting a plugin, i am using now the plugin “private_community_for_bp-master”.
    2. using buddypress 1.7.2
    3. using wordpress 3.5.1

    Regards,
    Haies H. Alshammari.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @bphelp

    Participant

    @haies
    You can add the below code to your themes functions.php or bp-custom.php
    You can change “profile” in the below code to whatever page you need if profile is not the page you want the user to be redirected too.

    
    function custom_login_redirect_to($user_login, $user) {
    	bp_core_redirect( get_option('siteurl') . "/profile/" );
    }
    add_action('wp_login', 'custom_login_redirect_to', 10, 2);
    

    There is also a plugin that you could try but it hasn’t been updated in over a year:
    https://wordpress.org/plugins/buddypress-login-redirect/

    @haies

    Participant

    @bphelp

    thank you for the code… but, i don’t have a page called profile and i couldn’t redirect to “User profile” either.

    now, when the user logs in he will be redirected to the Members directory on this link: http://www.mysite.com/members/. I want to change this to: when the user logs in, the page link will be like this: http://www.mysite.com and see all tabs that in the link: http://www.mysite.com/members/username

    @haies

    Participant

    Do i have to make a child theme to make this possible??

    @bphelp

    Participant

    @haies
    did you try the plugin I suggested. The code I provided is not my own so maybe the author @shanebp can chime in to help it work for you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘changing the redirect page when I log in.’ is closed to new replies.
Skip to toolbar