Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.