Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Created July 26, 2012 16:09
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 stuartduff/3182954 to your computer and use it in GitHub Desktop.
Save stuartduff/3182954 to your computer and use it in GitHub Desktop.
WordPress Get Logged In User Author Archive URL
function loggedin_user_archive() {
global $current_user;
get_currentuserinfo();
if ( is_user_logged_in() ) {
echo '<a href="' . site_url() . '/author/' . $current_user->display_name . '/">'. $current_user->display_name .' Archives</a>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment