Snippets

Dan Bochichio BuddyPress Login / Logout Redirect

You are viewing an old version of this snippet. View the current version.
Revised by Dan Bochichio 174fe0a
function custom_login_redirect_to($user_login, $user) {
	bp_core_redirect( get_option('siteurl') . "/dashboard" );
}
add_action('wp_login', 'custom_login_redirect_to', 10, 2);


add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
  wp_redirect( home_url() );
  exit();
}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.