stuart-d
7/26/2012 - 4:09 PM

WordPress Get Logged In User Author Archive URL

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>';
	}
	
}