Skip to content

Instantly share code, notes, and snippets.

@j4ckielord
Created February 18, 2014 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j4ckielord/9064099 to your computer and use it in GitHub Desktop.
Save j4ckielord/9064099 to your computer and use it in GitHub Desktop.
Redirect Author Archive to BuddyPress Profile Page
add_action( 'template_redirect', 'themename_redirect_author_archive_to_profile' );
function themename_redirect_author_archive_to_profile() {
if(is_author()){
$user_id = get_query_var( 'author' );
wp_redirect( bp_core_get_user_domain( $user_id ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment