use the following code snippet
function redirect_to_activity_page_after_login($user_login, $user) {
// Redirect to the activity page after login
wp_redirect( home_url( '/activity' ) );
exit;
}
add_action('wp_login', 'redirect_to_activity_page_after_login', 10, 2);
Thanks Varun.
With this code I get the message ‘parser error’ . I am using BuddyX pro.
Thanks for connecting on Mastodon.
Lars
@adjunkten might be some typo error in copy-paste, but the code is fine
You can use the Code Snippet plugin to use custom snippets.
Tested, works great.
BP 10.6.1
TwentySixteen theme
Tested again
If I disable ‘sign-in popup’ in the BuddyX theme I no longer get the parser error.
Buddypress 12.2