Skip to content

Instantly share code, notes, and snippets.

@studiograsshopper
Created May 18, 2012 06:47
Show Gist options
  • Save studiograsshopper/2723615 to your computer and use it in GitHub Desktop.
Save studiograsshopper/2723615 to your computer and use it in GitHub Desktop.
bbpress profile redirect
//add_action('bb_init', 'profile_redirect');
// @link http://bbpress.org/forums/topic/one-profile-page-to-rule-them-all
function profile_redirect() {
if (is_bb_profile() && $_GET['tab'] != 'edit' && $_GET['tab'] != 'favorites') {
$user = bb_get_user($_GET['id']);
if ($user) wp_redirect("http://www.example.com/member/" . $user->user_nicename);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment