WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using BP theres a way to:

1. On login redirect to member profile.

2. On logout redirect to facebook.com

Thanks in advance.

share|improve this question
up vote 3 down vote accepted

heres how you login to the profile page.

/*Add a filter to filter the redirect url for login*/
function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user)
/*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/

    /*if the user is not site admin,redirect to his/her profile*/
        return bp_core_get_user_domain($user->ID);
        return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/


and heres to logout to facebook

function allow_ms_parent_redirect($allowed)
    $allowed[] = 'facebook.com';
    return $allowed;

<a href="<?php echo wp_logout_url( 'http://facebook.com' ); ?>" title="Logout">Logout</a>
share|improve this answer
Where/what file is this code added to? – Mike Stumpf Jul 15 '13 at 13:02
This can be added to your functions file of your theme. – Jeremy Love Jul 15 '13 at 17:00
Thank you for your help – Mike Stumpf Jul 15 '13 at 19:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.