Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to redirect users to current buddypress group page after login


  • CBWill
    Participant

    @cbwill

    Hi there,

    I wrote some code in my functions.php file that would allow users to log in from a buddypress group page, instead of seeing the “join group” button. When they log in, I would like them to be directed back to the same group page that they were on. Here is the code that I have written…right now, they get redirected to mysite.com/groups/ instead of mysite.com/groups/groupname. Thanks for any help!

    echo '<div class="generic-button group-button public" id="groupbutton"><a href="' . wp_login_url( get_permalink() ) . '" title="Sign in to join group" class="group-button join-group">Sign in to join group</a></div>';	}
    
  • The topic ‘How to redirect users to current buddypress group page after login’ is closed to new replies.
Skip to toolbar