Created
July 26, 2012 16:09
-
-
Save stuartduff/3182954 to your computer and use it in GitHub Desktop.
WordPress Get Logged In User Author Archive URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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