Get Xprofile field of page author
Hey There, I need a bit of help, I’m basically trying to echo a field, but so far i’ve only been able to do this.
<?php echo xprofile_get_field_data( 'TWITCH TV Username', $current_user->ID ); ?>
Currently this will echo said field for the currently logged in user, but what i need is to get the field for the author of the page.
<?php echo xprofile_get_field_data( 'TWITCH TV Username', get_the_author_id() ); ?>
But this just returns nothing at all.
Any help would be great, thanks.
- The topic ‘Get Xprofile field of page author’ is closed to new replies.