Export Author Info
-
Hi,
I’m trying to export the author data. I used your snippet for showing the Author Name from ID, I’d like to be able to pull the author info from the ID.
I’ve tried the following with no success:
function my_get_author( $user_id ) {
$user = get_user_by( ‘id’, $user_id );
return $user->display_name;
return $user->user_email;
}
function my_author_info( $user_info ) {
$user_info = get_userdata(1);
echo ‘Username: ‘ . $user_info->user_login . “\n”;
echo ‘User roles: ‘ . implode(‘, ‘, $user_info->roles) . “\n”;}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Export Author Info’ is closed to new replies.