Skip to content

Instantly share code, notes, and snippets.

@gMagicScott
Created March 6, 2015 04:31
Show Gist options
  • Save gMagicScott/0425fa409043ce507acf to your computer and use it in GitHub Desktop.
Save gMagicScott/0425fa409043ce507acf to your computer and use it in GitHub Desktop.
add_filter( 'author_link', 'prefix_adjust_author_link', 10, 3 );
function prefix_adjust_author_link( $link, $author_id, $author_nicename ) {
$author_id = intval( $author_id ); // Sanitize
$user_info = get_userdata( $author_id );
if ( ! $user_info ) {
return $link;
}
$link = home_url( '/' ) . 'who/' . $user_info->user_login;
return trailingslashit( $link );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment