Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change login landingpage

  • Avatar of Tagcloud
    Tagcloud
    Participant

    @rondena

    Hi

    Can i change the landingpage for members logging in with shortcode bbp-login?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    bbp-login is a bbPress shortcode.

    Avatar of MarialKa
    MarialKa
    Participant

    @marialka

    Well but this plugin seems do not work with latest v1.7 :-( any way known? thanks

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @marialka
    You could try adding something like this to bp-custom.php :

    
    function bphelp_logged_in_visitor_redirect() {
    global $bp;
    if(is_user_logged_in()) {
    wp_redirect( get_option('siteurl') . '/activity' );
    }
    }
    add_filter('get_header','bphelp_logged_in_visitor_redirect',1);
    

    Just change the line:

    
    wp_redirect( get_option('siteurl') . '/activity' ); 
    

    To:
    `
    wp_redirect( get_option(‘siteurl’) . ‘/members’ );

    OR whatever page you want them directed too upon login.

    Avatar of MarialKa
    MarialKa
    Participant

    @marialka

    Ok, thank you @bp-help, I will try it soon ;-) then give my feedbacks to you

    Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    @marialka

    Put this function in your theme/functions.php or plugins/bp-custom.php
    And change ‘members’ to the slug of the page you want.

    function custom_login_redirect_to($user_login, $user) {
    	bp_core_redirect( get_option('siteurl') . "/members/" );
    }
    add_action('wp_login', 'custom_login_redirect_to', 10, 2);
    Avatar of MarialKa
    MarialKa
    Participant

    @marialka

    @bphelp, this gime me an error: “The page isn’t redirecting properly”

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    This problem can sometimes be caused by disabling or refusing to accept cookies.

    Avatar of MarialKa
    MarialKa
    Participant

    @marialka

    Great, thank you @shanebp, tried your function, then it seems than it works well in my case

    May be, it could be possible, now :-) to add the same way for logout, is not ?

    Avatar of jwf3773
    jwf3773
    Participant

    @jwf3773

    @shanebp or @bphelp
    Is there a way of manipulating the following code to simply refresh the current page the user is on?

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

    The login widget resides on every page. If a user logs in, I don’t want to send them to another page and HOPE they make their way back to where they started :)

    Thanks!

    Avatar of Guillaume S.
    Guillaume
    Participant

    @guillaumes

    Hello,

    Anybody can please guide me if I want to redirect my user to a custom page after login ( And Login from the Login Widget)

    I tried the shortcode (BP Login Redirect plugin) but I cannot choose a custom URL

    I would like to redirect my user to a specific page, like mysite.com/recent-news

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.